File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -63,4 +63,10 @@ def prepareArguments(self):
6363 parser .add_argument ('--securityLevel' , help = 'Set security level while creating user.' )
6464 parser .add_argument ('--state' , help = 'State value used in user suspension.' )
6565
66+
67+ ### WP Install
68+
69+ parser .add_argument ('--siteTitle' , help = 'Site Title for application installers.' )
70+ parser .add_argument ('--path' , help = 'Path for application installers.' )
71+
6672 return parser .parse_args ()
Original file line number Diff line number Diff line change @@ -1471,6 +1471,51 @@ def main():
14711471
14721472 print (response .content .decode ())
14731473
1474+ ### Application installers
1475+
1476+ elif args .function == "installWordPress" :
1477+ completeCommandExample = 'cyberpanel installWordPress --domainName cyberpanel.net --email support@cyberpanel.net --userName cyberpanel --password helloworld --siteTitle "WordPress Site" --path helloworld (this is optional)'
1478+
1479+ if not args .domainName :
1480+ print ("\n \n Please enter Domain name. For example:\n \n " + completeCommandExample + "\n \n " )
1481+ return
1482+
1483+ if not args .email :
1484+ print ("\n \n Please enter email. For example:\n \n " + completeCommandExample + "\n \n " )
1485+ return
1486+
1487+ if not args .userName :
1488+ print ("\n \n Please enter User name. For example:\n \n " + completeCommandExample + "\n \n " )
1489+ return
1490+
1491+ if not args .password :
1492+ print ("\n \n Please enter password. For example:\n \n " + completeCommandExample + "\n \n " )
1493+ return
1494+
1495+ if not args .siteTitle :
1496+ print ("\n \n Please enter site title. For example:\n \n " + completeCommandExample + "\n \n " )
1497+ return
1498+
1499+ if not args .path :
1500+ home = '1'
1501+ path = ''
1502+ else :
1503+ home = '0'
1504+ path = args .path
1505+
1506+ from websiteFunctions .website import WebsiteManager
1507+
1508+ data = {}
1509+ data ['adminUser' ] = args .userName
1510+ data ['blogTitle' ] = args .siteTitle
1511+ data ['domain' ] = args .domainName
1512+ data ['adminEmail' ] = args .email
1513+ data ['passwordByPass' ] = args .password
1514+ data ['home' ] = home
1515+ data ['path' ] = path
1516+
1517+ wm = WebsiteManager ()
1518+ wm .installWordpress (1 , data )
14741519
14751520
14761521
You can’t perform that action at this time.
0 commit comments