update to p3
This commit is contained in:
parent
4509dda78f
commit
8d77c7336f
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import subprocess
|
||||
import shlex
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class CLManagerMain(multi.Thread):
|
|||
1)
|
||||
return 0
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/CLManager/CageFS.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python /usr/local/CyberCP/CLManager/CageFS.py"
|
||||
execPath = execPath + " --function submitCageFSInstall"
|
||||
ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import plogical.CyberCPLogFileWriter as logging
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
@ -318,7 +318,7 @@ class IncJobs(multi.Thread):
|
|||
self.awsFunction('restore', '', self.jobid.snapshotid)
|
||||
|
||||
metaPathNew = '/home/%s/meta.xml' % (self.website)
|
||||
execPath = "nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/IncBackups/restoreMeta.py"
|
||||
execPath = "nice -n 10 /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/IncBackups/restoreMeta.py"
|
||||
execPath = execPath + " submitRestore --metaPath %s --statusFile %s" % (metaPathNew, self.statusPath)
|
||||
result = ProcessUtilities.outputExecutioner(execPath)
|
||||
logging.statusWriter(self.statusPath, result, 1)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ def addDestination(request):
|
|||
pass
|
||||
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " submitDestinationCreation --ipAddress " + ipAddress + " --password " \
|
||||
+ password + " --port " + port
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class servCTRL:
|
|||
if os.path.exists(servCTRL.pidfile):
|
||||
self.stop()
|
||||
|
||||
command = '/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/WebTerminal/CPWebSocket.py'
|
||||
command = '/usr/local/CyberCP/bin/python /usr/local/CyberCP/WebTerminal/CPWebSocket.py'
|
||||
subprocess.Popen(shlex.split(command))
|
||||
|
||||
def stop(self):
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ def remoteTransfer(request):
|
|||
|
||||
## Accounts to transfer is a path to file, containing accounts.
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = execPath + " remoteTransfer --ipAddress " + ipAddress + " --dir " + dir + " --accountsToTransfer " + path
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
@ -252,7 +252,7 @@ class BackupManager:
|
|||
backupCancellationDomain = data['backupCancellationDomain']
|
||||
fileName = data['fileName']
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " cancelBackupCreation --backupCancellationDomain " + backupCancellationDomain + " --fileName " + fileName
|
||||
subprocess.call(shlex.split(execPath))
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ class BackupManager:
|
|||
else:
|
||||
return ACLManager.loadErrorJson()
|
||||
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " submitRestore --backupFile " + backupFile + " --dir " + dir
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
time.sleep(4)
|
||||
|
|
@ -427,7 +427,7 @@ class BackupManager:
|
|||
except:
|
||||
port = "22"
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " submitDestinationCreation --ipAddress " + ipAddress + " --password " \
|
||||
+ password + " --port " + port
|
||||
|
||||
|
|
@ -506,7 +506,7 @@ class BackupManager:
|
|||
|
||||
ipAddress = data['IPAddress']
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " getConnectionStatus --ipAddress " + ipAddress
|
||||
|
||||
output = ProcessUtilities.executioner(execPath)
|
||||
|
|
@ -658,13 +658,13 @@ class BackupManager:
|
|||
return HttpResponse(final_json)
|
||||
else:
|
||||
if backupDest == "Home" and backupFreq == "Daily":
|
||||
cronJob = "0 3 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupScheduleLocal.py"
|
||||
cronJob = "0 3 * * * root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/backupScheduleLocal.py"
|
||||
elif backupDest == "Home" and backupFreq == "Weekly":
|
||||
cronJob = "0 0 * * 0 root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupScheduleLocal.py "
|
||||
cronJob = "0 0 * * 0 root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/backupScheduleLocal.py "
|
||||
elif backupDest != "Home" and backupFreq == "Daily":
|
||||
cronJob = "0 3 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupSchedule.py"
|
||||
cronJob = "0 3 * * * root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/backupSchedule.py"
|
||||
elif backupDest != "Home" and backupFreq == "Weekly":
|
||||
cronJob = "0 0 * * 0 root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupSchedule.py "
|
||||
cronJob = "0 0 * * 0 root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/backupSchedule.py "
|
||||
|
||||
command = "cat " + path
|
||||
output = ProcessUtilities.outputExecutioner(command)
|
||||
|
|
@ -700,13 +700,13 @@ class BackupManager:
|
|||
return HttpResponse(final_json)
|
||||
except:
|
||||
if backupDest == "Home" and backupFreq == "Daily":
|
||||
cronJob = "0 3 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupScheduleLocal.py"
|
||||
cronJob = "0 3 * * * root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/backupScheduleLocal.py"
|
||||
elif backupDest == "Home" and backupFreq == "Weekly":
|
||||
cronJob = "0 0 * * 0 root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupScheduleLocal.py "
|
||||
cronJob = "0 0 * * 0 root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/backupScheduleLocal.py "
|
||||
elif backupDest != "Home" and backupFreq == "Daily":
|
||||
cronJob = "0 3 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupSchedule.py"
|
||||
cronJob = "0 3 * * * root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/backupSchedule.py"
|
||||
elif backupDest != "Home" and backupFreq == "Weekly":
|
||||
cronJob = "0 0 * * 0 root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/backupSchedule.py "
|
||||
cronJob = "0 0 * * 0 root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/backupSchedule.py "
|
||||
|
||||
command = "cat " + path
|
||||
output = ProcessUtilities.outputExecutioner(command)
|
||||
|
|
@ -897,7 +897,7 @@ class BackupManager:
|
|||
|
||||
##
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = execPath + " writeAuthKey --pathToKey " + pathToKey
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -1063,7 +1063,7 @@ class BackupManager:
|
|||
|
||||
##
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = execPath + " remoteBackupRestore --backupDirComplete " + backupDirComplete + " --backupDir " + str(
|
||||
backupDir)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class CloudManager:
|
|||
## 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.data[
|
||||
'domainName'] + " --bandwidth " + str(
|
||||
website.package.bandwidth)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import plogical.CyberCPLogFileWriter as logging
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class ContainerManager(multi.Thread):
|
|||
1)
|
||||
return 0
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/containerization/container.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python /usr/local/CyberCP/containerization/container.py"
|
||||
execPath = execPath + " --function submitContainerInstall"
|
||||
ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ def setupPHPMYAdminSession(request):
|
|||
userID = request.session['userID']
|
||||
admin = Administrator.objects.get(id = userID)
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/databases/databaseManager.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python /usr/local/CyberCP/databases/databaseManager.py"
|
||||
execPath = execPath + " generatePHPMYAdminData --userID " + str(userID)
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
|
||||
import os
|
||||
import os.path
|
||||
|
|
@ -82,7 +82,7 @@ class ContainerManager(multi.Thread):
|
|||
writeToFile = open(ServerStatusUtil.lswsInstallStatusPath, 'w')
|
||||
writeToFile.close()
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/dockerManager/dockerInstall.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python /usr/local/CyberCP/dockerManager/dockerInstall.py"
|
||||
ProcessUtilities.executioner(execPath)
|
||||
|
||||
time.sleep(2)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import plogical.CyberCPLogFileWriter as logging
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
|
||||
import os
|
||||
import time
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ def savePolicyServerStatus(request):
|
|||
|
||||
## save configuration data
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " savePolicyServerStatus --install " + install
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -801,7 +801,7 @@ def installSpamAssassin(request):
|
|||
return ACLManager.loadErrorJson()
|
||||
try:
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " installSpamAssassin"
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
||||
|
|
@ -827,7 +827,7 @@ def installStatusSpamAssassin(request):
|
|||
|
||||
if installStatus.find("[200]")>-1:
|
||||
|
||||
execPath = "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin && /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin && /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " configureSpamAssassin"
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -997,7 +997,7 @@ def saveSpamAssassinConfigurations(request):
|
|||
|
||||
## save configuration data
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " saveSpamAssassinConfigs --tempConfigPath " + tempConfigPath
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
@ -371,7 +371,7 @@ class FirewallManager:
|
|||
else:
|
||||
rootLogin = "0"
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = execPath + " saveSSHConfigs --type " + str(type) + " --sshPort " + sshPort + " --rootLogin " + rootLogin
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
@ -426,7 +426,7 @@ class FirewallManager:
|
|||
|
||||
key = data['key']
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = execPath + " deleteSSHKey --key '" + key + "'"
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
@ -462,7 +462,7 @@ class FirewallManager:
|
|||
writeToFile.write(key)
|
||||
writeToFile.close()
|
||||
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = execPath + " addSSHKey --tempPath " + tempPath
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
@ -520,7 +520,7 @@ class FirewallManager:
|
|||
else:
|
||||
return ACLManager.loadErrorJson('installModSec', 0)
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = execPath + " installModSec"
|
||||
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
|
@ -543,7 +543,7 @@ class FirewallManager:
|
|||
|
||||
if installStatus.find("[200]") > -1:
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
|
||||
execPath = execPath + " installModSecConfigs"
|
||||
|
||||
|
|
@ -789,7 +789,7 @@ class FirewallManager:
|
|||
|
||||
## save configuration data
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
|
||||
execPath = execPath + " saveModSecConfigs --tempConfigPath " + tempConfigPath
|
||||
|
||||
|
|
@ -844,7 +844,7 @@ class FirewallManager:
|
|||
|
||||
## save configuration data
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
|
||||
execPath = execPath + " saveModSecConfigs --tempConfigPath " + tempConfigPath
|
||||
|
||||
|
|
@ -970,7 +970,7 @@ class FirewallManager:
|
|||
|
||||
## save configuration data
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = execPath + " saveModSecRules"
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -1115,7 +1115,7 @@ class FirewallManager:
|
|||
|
||||
if ProcessUtilities.decideServer() == ProcessUtilities.OLS:
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = execPath + " " + packName
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
@ -1133,7 +1133,7 @@ class FirewallManager:
|
|||
final_json = json.dumps({'installStatus': 0, 'error_message': "OWASP will be available later.", })
|
||||
return HttpResponse(final_json)
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = execPath + " " + packName
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -1273,7 +1273,7 @@ class FirewallManager:
|
|||
else:
|
||||
functionName = 'enableRuleFile'
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
|
||||
execPath = execPath + " " + functionName + ' --packName ' + packName + ' --fileName ' + fileName
|
||||
|
||||
|
|
@ -1325,7 +1325,7 @@ class FirewallManager:
|
|||
else:
|
||||
return ACLManager.loadErrorJson('installStatus', 0)
|
||||
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/csf.py"
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/csf.py"
|
||||
execPath = execPath + " installCSF"
|
||||
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
|
@ -1394,7 +1394,7 @@ class FirewallManager:
|
|||
else:
|
||||
return ACLManager.loadErrorJson('installStatus', 0)
|
||||
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/csf.py"
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/csf.py"
|
||||
execPath = execPath + " removeCSF"
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
||||
|
|
@ -1453,7 +1453,7 @@ class FirewallManager:
|
|||
controller = data['controller']
|
||||
status = data['status']
|
||||
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/csf.py"
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/csf.py"
|
||||
execPath = execPath + " changeStatus --controller " + controller + " --status " + status
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -1494,7 +1494,7 @@ class FirewallManager:
|
|||
writeToFile.write(ports)
|
||||
writeToFile.close()
|
||||
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/csf.py"
|
||||
execPath = "sudo /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/csf.py"
|
||||
execPath = execPath + " modifyPorts --protocol " + protocol + " --ports " + portsPath
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -526,12 +526,12 @@ class preFlightsChecks:
|
|||
|
||||
os.chdir("CyberCP")
|
||||
|
||||
command = "/usr/local/CyberCP/bin/python2 manage.py makemigrations"
|
||||
command = "/usr/local/CyberCP/bin/python manage.py makemigrations"
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
|
||||
|
||||
##
|
||||
|
||||
command = "/usr/local/CyberCP/bin/python2 manage.py migrate"
|
||||
command = "/usr/local/CyberCP/bin/python manage.py migrate"
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
|
||||
|
||||
if not os.path.exists("/usr/local/CyberCP/public"):
|
||||
|
|
@ -1666,7 +1666,7 @@ imap_folder_list_limit = 0
|
|||
cronFile.writelines("0 * * * * root /usr/local/CyberCP/postfixSenderPolicy/client.py hourlyCleanup" + "\n")
|
||||
cronFile.writelines("0 0 1 * * root /usr/local/CyberCP/postfixSenderPolicy/client.py monthlyCleanup" + "\n")
|
||||
cronFile.writelines("0 2 * * * root /usr/local/CyberCP/plogical/upgradeCritical.py" + "\n")
|
||||
cronFile.writelines("0 2 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/renew.py\n")
|
||||
cronFile.writelines("0 2 * * * root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py\n")
|
||||
cronFile.close()
|
||||
|
||||
command = 'chmod +x /usr/local/CyberCP/plogical/findBWUsage.py'
|
||||
|
|
@ -1970,7 +1970,7 @@ milter_default_action = accept
|
|||
command = "python3.6 -m venv /usr/local/CyberCP"
|
||||
preFlightsChecks.call(command, distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
command = "ln -s /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/bin/python"
|
||||
command = "ln -s /usr/local/CyberCP/bin/python /usr/local/CyberCP/bin/python"
|
||||
preFlightsChecks.call(command, distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
except OSError as msg:
|
||||
|
|
@ -2146,12 +2146,12 @@ milter_default_action = accept
|
|||
data = open(cronTab, 'r').read()
|
||||
|
||||
if data.find('IncScheduler') == -1:
|
||||
cronJob = '0 12 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/IncBackups/IncScheduler.py Daily\n'
|
||||
cronJob = '0 12 * * * root /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily\n'
|
||||
|
||||
writeToFile = open(cronTab, 'a')
|
||||
writeToFile.writelines(cronJob)
|
||||
|
||||
cronJob = '0 0 * * 0 root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/IncBackups/IncScheduler.py Daily\n'
|
||||
cronJob = '0 0 * * 0 root /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily\n'
|
||||
writeToFile.writelines(cronJob)
|
||||
writeToFile.close()
|
||||
except:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
# coding=utf-8
|
||||
import os.path
|
||||
import sys
|
||||
|
|
@ -650,7 +650,7 @@ class MailServerManager:
|
|||
else:
|
||||
return ACLManager.loadErrorJson()
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " generateKeys --domain " + domainName
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -720,7 +720,7 @@ class MailServerManager:
|
|||
|
||||
if installStatus.find("[200]") > -1:
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " configureOpenDKIM"
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
|
|||
|
|
@ -1276,10 +1276,10 @@ def submitExtensionRequest(request):
|
|||
type = data['type']
|
||||
|
||||
if type == "install":
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = execPath + " installPHPExtension --extension " + extensionName
|
||||
else:
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = execPath + " unInstallPHPExtension --extension " + extensionName
|
||||
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
|
@ -1699,7 +1699,7 @@ def savePHPConfigBasic(request):
|
|||
|
||||
##
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = execPath + " savePHPConfigBasic --phpVers " + phpVers + " --allow_url_fopen '" + allow_url_fopen + "' --display_errors '" + display_errors + "' --file_uploads '" + file_uploads + "' --allow_url_include '" + allow_url_include + "' --memory_limit " + memory_limit + " --max_execution_time " + max_execution_time + " --upload_max_filesize " + upload_max_filesize + " --max_input_time " + max_input_time + " --post_max_size " + post_max_size
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
@ -1797,7 +1797,7 @@ def savePHPConfigAdvance(request):
|
|||
vhost.write(data['configData'])
|
||||
vhost.close()
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = execPath + " savePHPConfigAdvance --phpVers " + path + " --tempPath " + tempPath
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ def issueSSL(request):
|
|||
|
||||
## ssl issue
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " issueSSL --virtualHostName " + virtualHost + " --administratorEmail " + adminEmail + " --path " + path
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ def obtainHostNameSSL(request):
|
|||
|
||||
## ssl issue
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " issueSSLForHostName --virtualHostName " + virtualHost + " --path " + path
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -240,7 +240,7 @@ def obtainMailServerSSL(request):
|
|||
|
||||
## ssl issue
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " issueSSLForMailServer --virtualHostName " + virtualHost + " --path " + path
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os, sys
|
||||
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1106,7 +1106,7 @@ def submitBackupCreation(tempStoragePath, backupName, backupPath, backupDomain):
|
|||
command = 'chown %s:%s %s' % (website.externalApp, website.externalApp, status)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " startBackup --tempStoragePath " + tempStoragePath + " --backupName " \
|
||||
+ backupName + " --backupPath " + backupPath + ' --backupDomain ' + backupDomain + ' --metaPath %s' % (result[2])
|
||||
|
||||
|
|
@ -1135,7 +1135,7 @@ def submitBackupCreation(tempStoragePath, backupName, backupPath, backupDomain):
|
|||
|
||||
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
if output.find('1,None') > -1:
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " BackupRoot --tempStoragePath " + tempStoragePath + " --backupName " \
|
||||
+ backupName + " --backupPath " + backupPath + ' --backupDomain ' + backupDomain + ' --metaPath %s' % (
|
||||
result[2])
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import CyberCPLogFileWriter as logging
|
||||
import subprocess
|
||||
import shlex
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class mailUtilities:
|
|||
|
||||
## After effects
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/mailUtilities.py"
|
||||
execPath = execPath + " AfterEffects --domain " + domain
|
||||
|
||||
if getpass.getuser() == 'root':
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ class ProcessUtilities(multi.Thread):
|
|||
|
||||
@staticmethod
|
||||
def BuildCommand(path, functionName, parameters):
|
||||
execPath = "/usr/local/CyberCP/bin/python2 %s %s " % (path, functionName)
|
||||
execPath = "/usr/local/CyberCP/bin/python %s %s " % (path, functionName)
|
||||
for key, value in parameters.items():
|
||||
execPath = execPath + ' --%s %s' % (key, value)
|
||||
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ class remoteTransferUtilities:
|
|||
writeToFile.close()
|
||||
|
||||
backupFile = backup
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " submitRestore --backupFile " + backupFile + " --dir " + dir
|
||||
subprocess.Popen(shlex.split(execPath))
|
||||
time.sleep(4)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1941,19 +1941,19 @@ failovermethod=priority
|
|||
data = open(cronTab, 'r').read()
|
||||
|
||||
if data.find('IncScheduler') == -1:
|
||||
cronJob = '0 12 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/IncBackups/IncScheduler.py Daily\n'
|
||||
cronJob = '0 12 * * * root /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily\n'
|
||||
|
||||
writeToFile = open(cronTab, 'a')
|
||||
writeToFile.writelines(cronJob)
|
||||
|
||||
cronJob = '0 0 * * 0 root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/IncBackups/IncScheduler.py Daily\n'
|
||||
cronJob = '0 0 * * 0 root /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily\n'
|
||||
writeToFile.writelines(cronJob)
|
||||
writeToFile.close()
|
||||
|
||||
|
||||
if data.find('renew.py') == -1:
|
||||
writeToFile = open(cronTab, 'a')
|
||||
writeToFile.writelines("0 2 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/renew.py\n")
|
||||
writeToFile.writelines("0 2 * * * root /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py\n")
|
||||
writeToFile.close()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import subprocess, shlex
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
@ -196,7 +196,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 " \
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class pluginInstaller:
|
|||
|
||||
os.chdir('/usr/local/CyberCP')
|
||||
|
||||
command = "/usr/local/CyberCP/bin/python2 manage.py collectstatic --noinput"
|
||||
command = "/usr/local/CyberCP/bin/python manage.py collectstatic --noinput"
|
||||
subprocess.call(shlex.split(command))
|
||||
|
||||
command = "mv /usr/local/CyberCP/static /usr/local/lscp/cyberpanel"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import socket
|
||||
import sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import subprocess, signal
|
||||
import shlex
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
try:
|
||||
import os
|
||||
import os.path
|
||||
|
|
@ -117,7 +117,7 @@ class S3Backups(multi.Thread):
|
|||
writeToFile.writelines(items + "\n")
|
||||
|
||||
if cronCheck:
|
||||
writeToFile.writelines("0 0 * * * root /usr/local/CyberCP/bin/python2 /usr/local/CyberCP/s3Backups/s3Backups.py > /home/cyberpanel/error-logs.txt 2>&1\n")
|
||||
writeToFile.writelines("0 0 * * * root /usr/local/CyberCP/bin/python /usr/local/CyberCP/s3Backups/s3Backups.py > /home/cyberpanel/error-logs.txt 2>&1\n")
|
||||
|
||||
writeToFile.close()
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ def clearLogFile(request):
|
|||
|
||||
fileName = data['fileName']
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/serverLogs.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/serverLogs.py"
|
||||
execPath = execPath + " cleanLogFile --fileName " + fileName
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os.path
|
||||
import sys
|
||||
import django
|
||||
|
|
@ -124,7 +124,7 @@ class tuningManager:
|
|||
inMemCache = data['inMemCache']
|
||||
gzipCompression = data['gzipCompression']
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/tuning.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/tuning.py"
|
||||
execPath = execPath + " saveTuningDetails --maxConn " + maxConn + " --maxSSLConn " + maxSSLConn + " --connTime " + connTime + " --keepAlive " + keepAlive + " --inMemCache '" + inMemCache + "' --gzipCompression " + gzipCompression
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ class tuningManager:
|
|||
procHardLimit = str(data['procHardLimit'])
|
||||
persistConn = data['persistConn']
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/tuning.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/tuning.py"
|
||||
execPath = execPath + " tunePHP --virtualHost " + domainSelection + " --initTimeout " + initTimeout + " --maxConns " + maxConns + " --memSoftLimit " + memSoftLimit + " --memHardLimit '" + memHardLimit + "' --procSoftLimit " + procSoftLimit + " --procHardLimit " + procHardLimit + " --persistConn " + persistConn
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/CyberCP/bin/python2
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import threading as multi
|
||||
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
||||
from plogical.virtualHostUtilities import virtualHostUtilities
|
||||
|
|
@ -42,7 +42,7 @@ class StagingSetup(multi.Thread):
|
|||
|
||||
logging.statusWriter(tempStatusPath, 'Creating domain for staging environment..,5')
|
||||
phpSelection = 'PHP 7.1'
|
||||
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 0 --dkimCheck 0 --openBasedir 0 --path " + path + ' --websiteOwner ' \
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue