update to p3

This commit is contained in:
Usman Nasir
2019-12-10 23:04:24 +05:00
parent 4509dda78f
commit 8d77c7336f
67 changed files with 141 additions and 141 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/local/CyberCP/bin/python2
#!/usr/local/CyberCP/bin/python
import os
import os.path
import sys
@@ -197,7 +197,7 @@ class WebsiteManager:
## Create Configurations
execPath = "sudo /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "sudo /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " createVirtualHost --virtualHostName " + domain + \
" --administratorEmail " + adminEmail + " --phpVersion '" + phpSelection + \
"' --virtualHostUser " + externalApp + " --ssl " + str(data['ssl']) + " --dkimCheck " \
@@ -255,7 +255,7 @@ class WebsiteManager:
except:
apacheBackend = "0"
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " createDomain --masterDomain " + masterDomain + " --virtualHostName " + domain + \
" --phpVersion '" + phpSelection + "' --ssl " + str(data['ssl']) + " --dkimCheck " + str(
@@ -431,7 +431,7 @@ class WebsiteManager:
## Deleting master domain
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " deleteVirtualHostConfigurations --virtualHostName " + websiteName
ProcessUtilities.popenExecutioner(execPath)
@@ -456,7 +456,7 @@ class WebsiteManager:
else:
return ACLManager.loadErrorJson('websiteDeleteStatus', 0)
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " deleteDomain --virtualHostName " + websiteName
ProcessUtilities.outputExecutioner(execPath)
@@ -650,7 +650,7 @@ class WebsiteManager:
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + domain
completePathToConfigFile = confPath + "/vhost.conf"
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " changePHP --phpVersion '" + phpVersion + "' --path " + completePathToConfigFile
ProcessUtilities.popenExecutioner(execPath)
@@ -708,7 +708,7 @@ class WebsiteManager:
## bw usage calculation
try:
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " findDomainBW --virtualHostName " + self.domain + " --bandwidth " + str(
website.package.bandwidth)
@@ -810,7 +810,7 @@ class WebsiteManager:
## bw usage calculation
try:
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " findDomainBW --virtualHostName " + self.domain + " --bandwidth " + str(
website.package.bandwidth)
@@ -1027,7 +1027,7 @@ class WebsiteManager:
## save configuration data
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " saveVHostConfigs --path " + filePath + " --tempPath " + tempPath
output = ProcessUtilities.outputExecutioner(execPath)
@@ -1152,7 +1152,7 @@ class WebsiteManager:
## writing data temporary to file
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " saveSSL --virtualHostName " + self.domain + " --tempKeyPath " + tempKeyPath + " --tempCertPath " + tempCertPath
output = ProcessUtilities.outputExecutioner(execPath)
@@ -1182,7 +1182,7 @@ class WebsiteManager:
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + self.domain
completePathToConfigFile = confPath + "/vhost.conf"
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " changePHP --phpVersion '" + phpVersion + "' --path " + completePathToConfigFile
ProcessUtilities.popenExecutioner(execPath)
@@ -1215,7 +1215,7 @@ class WebsiteManager:
crons = []
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = execPath + " getWebsiteCron --externalApp " + website.externalApp
f = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
@@ -1276,7 +1276,7 @@ class WebsiteManager:
try:
CronUtil.CronPrem(1)
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = execPath + " getWebsiteCron --externalApp " + website.externalApp
f = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
@@ -1341,7 +1341,7 @@ class WebsiteManager:
CronUtil.CronPrem(1)
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = execPath + " saveCronChanges --externalApp " + website.externalApp + " --line " + str(
line) + " --finalCron '" + finalCron + "'"
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
@@ -1381,7 +1381,7 @@ class WebsiteManager:
CronUtil.CronPrem(1)
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = execPath + " remCronbyLine --externalApp " + website.externalApp + " --line " + str(
line)
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
@@ -1438,7 +1438,7 @@ class WebsiteManager:
finalCron = "%s %s %s %s %s %s" % (minute, hour, monthday, month, weekday, command)
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
execPath = execPath + " addNewCron --externalApp " + website.externalApp + " --finalCron '" + finalCron + "'"
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
@@ -1487,7 +1487,7 @@ class WebsiteManager:
## Create Configurations
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " createAlias --masterDomain " + self.domain + " --aliasDomain " + aliasDomain + " --ssl " + str(
ssl) + " --sslPath " + sslpath + " --administratorEmail " + admin.email + ' --websiteOwner ' + admin.userName
@@ -1532,7 +1532,7 @@ class WebsiteManager:
## Create Configurations
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " issueAliasSSL --masterDomain " + self.domain + " --aliasDomain " + aliasDomain + " --sslPath " + sslpath + " --administratorEmail " + admin.email
output = ProcessUtilities.outputExecutioner(execPath)
@@ -1567,7 +1567,7 @@ class WebsiteManager:
## Create Configurations
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " deleteAlias --masterDomain " + self.domain + " --aliasDomain " + aliasDomain
output = ProcessUtilities.outputExecutioner(execPath)
@@ -1599,7 +1599,7 @@ class WebsiteManager:
else:
return ACLManager.loadErrorJson('changeOpenBasedir', 0)
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " changeOpenBasedir --virtualHostName '" + self.domain + "' --openBasedirValue " + openBasedirValue
output = ProcessUtilities.popenExecutioner(execPath)
@@ -2388,7 +2388,7 @@ StrictHostKeyChecking no
tempStatusPath = "/home/cyberpanel/" + str(randint(1000, 9999))
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " switchServer --phpVersion '" + phpVersion + "' --server " + str(
server) + " --virtualHostName " + domainName + " --tempStatusPath " + tempStatusPath
ProcessUtilities.popenExecutioner(execPath)