mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
bug fix: remote transfer
This commit is contained in:
@@ -73,7 +73,7 @@ class CLManagerMain(multi.Thread):
|
||||
1)
|
||||
return 0
|
||||
|
||||
execPath = "sudo python /usr/local/CyberCP/CLManager/CageFS.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/CLManager/CageFS.py"
|
||||
execPath = execPath + " --function submitCageFSInstall"
|
||||
ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ def remoteTransfer(request):
|
||||
|
||||
## Accounts to transfer is a path to file, containing accounts.
|
||||
|
||||
execPath = "python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = execPath + " remoteTransfer --ipAddress " + ipAddress + " --dir " + dir + " --accountsToTransfer " + path
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ class BackupManager:
|
||||
backupCancellationDomain = data['backupCancellationDomain']
|
||||
fileName = data['fileName']
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " cancelBackupCreation --backupCancellationDomain " + backupCancellationDomain + " --fileName " + fileName
|
||||
subprocess.call(shlex.split(execPath))
|
||||
|
||||
@@ -310,7 +310,7 @@ class BackupManager:
|
||||
else:
|
||||
return ACLManager.loadErrorJson()
|
||||
|
||||
execPath = "sudo nice -n 10 python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " submitRestore --backupFile " + backupFile + " --dir " + dir
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
time.sleep(4)
|
||||
@@ -424,7 +424,7 @@ class BackupManager:
|
||||
except:
|
||||
port = "22"
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " submitDestinationCreation --ipAddress " + ipAddress + " --password " \
|
||||
+ password + " --port " + port
|
||||
|
||||
@@ -503,7 +503,7 @@ class BackupManager:
|
||||
|
||||
ipAddress = data['IPAddress']
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " getConnectionStatus --ipAddress " + ipAddress
|
||||
|
||||
output = ProcessUtilities.executioner(execPath)
|
||||
@@ -891,7 +891,7 @@ class BackupManager:
|
||||
|
||||
##
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = execPath + " writeAuthKey --pathToKey " + pathToKey
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -1057,7 +1057,7 @@ class BackupManager:
|
||||
|
||||
##
|
||||
|
||||
execPath = "python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
|
||||
execPath = execPath + " remoteBackupRestore --backupDirComplete " + backupDirComplete + " --backupDir " + str(
|
||||
backupDir)
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ class CloudManager:
|
||||
## bw usage calculation
|
||||
|
||||
try:
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " findDomainBW --virtualHostName " + self.data[
|
||||
'domainName'] + " --bandwidth " + str(
|
||||
website.package.bandwidth)
|
||||
|
||||
@@ -124,7 +124,7 @@ class ContainerManager(multi.Thread):
|
||||
1)
|
||||
return 0
|
||||
|
||||
execPath = "sudo python /usr/local/CyberCP/containerization/container.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/containerization/container.py"
|
||||
execPath = execPath + " --function submitContainerInstall"
|
||||
ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ def setupPHPMYAdminSession(request):
|
||||
userID = request.session['userID']
|
||||
admin = Administrator.objects.get(id = userID)
|
||||
|
||||
execPath = "sudo python /usr/local/CyberCP/databases/databaseManager.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/databases/databaseManager.py"
|
||||
execPath = execPath + " generatePHPMYAdminData --userID " + str(userID)
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -82,7 +82,7 @@ class ContainerManager(multi.Thread):
|
||||
writeToFile = open(ServerStatusUtil.lswsInstallStatusPath, 'w')
|
||||
writeToFile.close()
|
||||
|
||||
execPath = "sudo python /usr/local/CyberCP/dockerManager/dockerInstall.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/dockerManager/dockerInstall.py"
|
||||
ProcessUtilities.executioner(execPath)
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
@@ -101,7 +101,7 @@ def savePolicyServerStatus(request):
|
||||
|
||||
## save configuration data
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " savePolicyServerStatus --install " + install
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -784,7 +784,7 @@ def installSpamAssassin(request):
|
||||
return ACLManager.loadErrorJson()
|
||||
try:
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " installSpamAssassin"
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
||||
@@ -810,7 +810,7 @@ def installStatusSpamAssassin(request):
|
||||
|
||||
if installStatus.find("[200]")>-1:
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " configureSpamAssassin"
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -981,7 +981,7 @@ def saveSpamAssassinConfigurations(request):
|
||||
|
||||
## save configuration data
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " saveSpamAssassinConfigs --tempConfigPath " + tempConfigPath
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
||||
@@ -371,7 +371,7 @@ class FirewallManager:
|
||||
else:
|
||||
rootLogin = "0"
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = execPath + " saveSSHConfigs --type " + str(type) + " --sshPort " + sshPort + " --rootLogin " + rootLogin
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
@@ -418,7 +418,7 @@ class FirewallManager:
|
||||
|
||||
key = data['key']
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/firewallUtilities.py"
|
||||
execPath = execPath + " deleteSSHKey --key '" + key + "'"
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
@@ -512,7 +512,7 @@ class FirewallManager:
|
||||
else:
|
||||
return ACLManager.loadErrorJson('installModSec', 0)
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = execPath + " installModSec"
|
||||
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
@@ -535,7 +535,7 @@ class FirewallManager:
|
||||
|
||||
if installStatus.find("[200]") > -1:
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
|
||||
execPath = execPath + " installModSecConfigs"
|
||||
|
||||
@@ -781,7 +781,7 @@ class FirewallManager:
|
||||
|
||||
## save configuration data
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
|
||||
execPath = execPath + " saveModSecConfigs --tempConfigPath " + tempConfigPath
|
||||
|
||||
@@ -836,7 +836,7 @@ class FirewallManager:
|
||||
|
||||
## save configuration data
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
|
||||
execPath = execPath + " saveModSecConfigs --tempConfigPath " + tempConfigPath
|
||||
|
||||
@@ -962,7 +962,7 @@ class FirewallManager:
|
||||
|
||||
## save configuration data
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = execPath + " saveModSecRules"
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -1107,7 +1107,7 @@ class FirewallManager:
|
||||
|
||||
if ProcessUtilities.decideServer() == ProcessUtilities.OLS:
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = execPath + " " + packName
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
@@ -1125,7 +1125,7 @@ class FirewallManager:
|
||||
final_json = json.dumps({'installStatus': 0, 'error_message': "OWASP will be available later.", })
|
||||
return HttpResponse(final_json)
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = execPath + " " + packName
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -1265,7 +1265,7 @@ class FirewallManager:
|
||||
else:
|
||||
functionName = 'enableRuleFile'
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/modSec.py"
|
||||
|
||||
execPath = execPath + " " + functionName + ' --packName ' + packName + ' --fileName ' + fileName
|
||||
|
||||
|
||||
@@ -566,7 +566,7 @@ class MailServerManager:
|
||||
else:
|
||||
return ACLManager.loadErrorJson()
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " generateKeys --domain " + domainName
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -636,7 +636,7 @@ class MailServerManager:
|
||||
|
||||
if installStatus.find("[200]") > -1:
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||
execPath = execPath + " configureOpenDKIM"
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -1275,10 +1275,10 @@ def submitExtensionRequest(request):
|
||||
type = data['type']
|
||||
|
||||
if type == "install":
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = execPath + " installPHPExtension --extension " + extensionName
|
||||
else:
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = execPath + " unInstallPHPExtension --extension " + extensionName
|
||||
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
@@ -1698,7 +1698,7 @@ def savePHPConfigBasic(request):
|
||||
|
||||
##
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + 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)
|
||||
@@ -1796,7 +1796,7 @@ def savePHPConfigAdvance(request):
|
||||
vhost.write(data['configData'])
|
||||
vhost.close()
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/phpUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + 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 = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " issueSSL --virtualHostName " + virtualHost + " --administratorEmail " + adminEmail + " --path " + path
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -161,7 +161,7 @@ def obtainHostNameSSL(request):
|
||||
|
||||
## ssl issue
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " issueSSLForHostName --virtualHostName " + virtualHost + " --path " + path
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -236,7 +236,7 @@ def obtainMailServerSSL(request):
|
||||
|
||||
## ssl issue
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " issueSSLForMailServer --virtualHostName " + virtualHost + " --path " + path
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
|
||||
@@ -1064,7 +1064,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 python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " startBackup --tempStoragePath " + tempStoragePath + " --backupName " \
|
||||
+ backupName + " --backupPath " + backupPath + ' --backupDomain ' + backupDomain + ' --metaPath %s' % (result[2])
|
||||
|
||||
@@ -1093,7 +1093,7 @@ def submitBackupCreation(tempStoragePath, backupName, backupPath, backupDomain):
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
if output.find('1,None') > -1:
|
||||
execPath = "sudo nice -n 10 python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " BackupRoot --tempStoragePath " + tempStoragePath + " --backupName " \
|
||||
+ backupName + " --backupPath " + backupPath + ' --backupDomain ' + backupDomain + ' --metaPath %s' % (
|
||||
result[2])
|
||||
|
||||
@@ -272,7 +272,7 @@ class ProcessUtilities(multi.Thread):
|
||||
|
||||
@staticmethod
|
||||
def BuildCommand(path, functionName, parameters):
|
||||
execPath = "python %s %s " % (path, functionName)
|
||||
execPath = "/usr/local/CyberCP/bin/python2 %s %s " % (path, functionName)
|
||||
for key, value in parameters.iteritems():
|
||||
execPath = execPath + ' --%s %s' % (key, value)
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ class remoteTransferUtilities:
|
||||
writeToFile.close()
|
||||
|
||||
backupFile = backup
|
||||
execPath = "sudo nice -n 10 python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
|
||||
execPath = execPath + " submitRestore --backupFile " + backupFile + " --dir " + dir
|
||||
subprocess.Popen(shlex.split(execPath))
|
||||
time.sleep(4)
|
||||
|
||||
@@ -344,7 +344,9 @@ class Upgrade:
|
||||
break
|
||||
######
|
||||
|
||||
path = "/usr/local/CyberCP/public/rainloop/rainloop/v/1.12.1/include.php"
|
||||
iPath = os.listdir('/usr/local/CyberCP/public/rainloop/rainloop/v/')
|
||||
|
||||
path = "/usr/local/CyberCP/public/rainloop/rainloop/v/%s/include.php" % (iPath[0])
|
||||
|
||||
data = open(path, 'r').readlines()
|
||||
writeToFile = open(path, 'w')
|
||||
@@ -356,6 +358,8 @@ class Upgrade:
|
||||
else:
|
||||
writeToFile.writelines(items)
|
||||
|
||||
writeToFile.close()
|
||||
|
||||
os.chdir(cwd)
|
||||
|
||||
except BaseException, msg:
|
||||
@@ -1259,7 +1263,7 @@ class Upgrade:
|
||||
if csrfCheck == 1:
|
||||
writeToFile.writelines(" 'django.middleware.csrf.CsrfViewMiddleware',\n")
|
||||
|
||||
if items.find("'filemanager',") > -1:
|
||||
elif items.find("'filemanager',") > -1:
|
||||
writeToFile.writelines(items)
|
||||
if pluginCheck == 1:
|
||||
writeToFile.writelines(" 'pluginHolder',\n")
|
||||
|
||||
@@ -93,7 +93,7 @@ class pluginInstaller:
|
||||
|
||||
os.chdir('/usr/local/CyberCP')
|
||||
|
||||
command = "python manage.py collectstatic --noinput"
|
||||
command = "/usr/local/CyberCP/bin/python2 manage.py collectstatic --noinput"
|
||||
subprocess.call(shlex.split(command))
|
||||
|
||||
command = "mv /usr/local/CyberCP/static /usr/local/lscp/cyberpanel"
|
||||
|
||||
@@ -172,7 +172,7 @@ def clearLogFile(request):
|
||||
|
||||
fileName = data['fileName']
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/serverLogs.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/serverLogs.py"
|
||||
execPath = execPath + " cleanLogFile --fileName " + fileName
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -124,7 +124,7 @@ class tuningManager:
|
||||
inMemCache = data['inMemCache']
|
||||
gzipCompression = data['gzipCompression']
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/tuning.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + 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 = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/tuning.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + 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)
|
||||
|
||||
@@ -41,7 +41,7 @@ class StagingSetup(multi.Thread):
|
||||
|
||||
logging.statusWriter(tempStatusPath, 'Creating domain for staging environment..,5')
|
||||
phpSelection = 'PHP 7.1'
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
|
||||
execPath = execPath + " createDomain --masterDomain " + masterDomain + " --virtualHostName " + domain + \
|
||||
" --phpVersion '" + phpSelection + "' --ssl 0 --dkimCheck 0 --openBasedir 0 --path " + path + ' --websiteOwner ' \
|
||||
|
||||
@@ -255,7 +255,7 @@ class WebsiteManager:
|
||||
except:
|
||||
apacheBackend = "0"
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + 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 = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + 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 = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + 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 = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + 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 = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " findDomainBW --virtualHostName " + self.domain + " --bandwidth " + str(
|
||||
website.package.bandwidth)
|
||||
|
||||
@@ -785,7 +785,7 @@ class WebsiteManager:
|
||||
## bw usage calculation
|
||||
|
||||
try:
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " findDomainBW --virtualHostName " + self.domain + " --bandwidth " + str(
|
||||
website.package.bandwidth)
|
||||
|
||||
@@ -854,7 +854,7 @@ class WebsiteManager:
|
||||
## get Logs
|
||||
website = Websites.objects.get(domain=self.domain)
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " getAccessLogs --path " + fileName + " --page " + str(page)
|
||||
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
|
||||
@@ -914,7 +914,7 @@ class WebsiteManager:
|
||||
## get Logs
|
||||
website = Websites.objects.get(domain=self.domain)
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " getErrorLogs --path " + fileName + " --page " + str(page)
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
@@ -981,7 +981,7 @@ class WebsiteManager:
|
||||
|
||||
## save configuration data
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " saveVHostConfigs --path " + filePath + " --tempPath " + tempPath
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
@@ -1066,7 +1066,7 @@ class WebsiteManager:
|
||||
|
||||
## save configuration data
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " saveRewriteRules --virtualHostName " + self.domain + " --path " + filePath + " --tempPath " + tempPath
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath, externalApp)
|
||||
@@ -1110,7 +1110,7 @@ class WebsiteManager:
|
||||
|
||||
## writing data temporary to file
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " saveSSL --virtualHostName " + self.domain + " --tempKeyPath " + tempKeyPath + " --tempCertPath " + tempCertPath
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -1140,7 +1140,7 @@ class WebsiteManager:
|
||||
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + self.domain
|
||||
completePathToConfigFile = confPath + "/vhost.conf"
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " changePHP --phpVersion '" + phpVersion + "' --path " + completePathToConfigFile
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
||||
@@ -1173,7 +1173,7 @@ class WebsiteManager:
|
||||
|
||||
crons = []
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = execPath + " getWebsiteCron --externalApp " + website.externalApp
|
||||
|
||||
f = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
@@ -1234,7 +1234,7 @@ class WebsiteManager:
|
||||
|
||||
try:
|
||||
CronUtil.CronPrem(1)
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = execPath + " getWebsiteCron --externalApp " + website.externalApp
|
||||
|
||||
f = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
@@ -1299,7 +1299,7 @@ class WebsiteManager:
|
||||
|
||||
CronUtil.CronPrem(1)
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = execPath + " saveCronChanges --externalApp " + website.externalApp + " --line " + str(
|
||||
line) + " --finalCron '" + finalCron + "'"
|
||||
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
@@ -1339,7 +1339,7 @@ class WebsiteManager:
|
||||
|
||||
CronUtil.CronPrem(1)
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = execPath + " remCronbyLine --externalApp " + website.externalApp + " --line " + str(
|
||||
line)
|
||||
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
@@ -1396,7 +1396,7 @@ class WebsiteManager:
|
||||
|
||||
finalCron = "%s %s %s %s %s %s" % (minute, hour, monthday, month, weekday, command)
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/cronUtil.py"
|
||||
execPath = execPath + " addNewCron --externalApp " + website.externalApp + " --finalCron '" + finalCron + "'"
|
||||
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
|
||||
@@ -1445,7 +1445,7 @@ class WebsiteManager:
|
||||
|
||||
## Create Configurations
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
|
||||
execPath = execPath + " createAlias --masterDomain " + self.domain + " --aliasDomain " + aliasDomain + " --ssl " + str(
|
||||
ssl) + " --sslPath " + sslpath + " --administratorEmail " + admin.email + ' --websiteOwner ' + admin.userName
|
||||
@@ -1490,7 +1490,7 @@ class WebsiteManager:
|
||||
|
||||
## Create Configurations
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " issueAliasSSL --masterDomain " + self.domain + " --aliasDomain " + aliasDomain + " --sslPath " + sslpath + " --administratorEmail " + admin.email
|
||||
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
@@ -1525,7 +1525,7 @@ class WebsiteManager:
|
||||
|
||||
## Create Configurations
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " deleteAlias --masterDomain " + self.domain + " --aliasDomain " + aliasDomain
|
||||
output = ProcessUtilities.outputExecutioner(execPath)
|
||||
|
||||
@@ -1557,7 +1557,7 @@ class WebsiteManager:
|
||||
else:
|
||||
return ACLManager.loadErrorJson('changeOpenBasedir', 0)
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " changeOpenBasedir --virtualHostName '" + self.domain + "' --openBasedirValue " + openBasedirValue
|
||||
output = ProcessUtilities.popenExecutioner(execPath)
|
||||
|
||||
@@ -1801,7 +1801,7 @@ class WebsiteManager:
|
||||
statusFile.writelines('Downloading Joomla Core..,20')
|
||||
statusFile.close()
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
|
||||
execPath = execPath + " installJoomla --virtualHostName " + domainName + \
|
||||
" --virtualHostUser " + externalApp + " --path " + finalPath + " --dbName " + dbName + \
|
||||
@@ -2285,7 +2285,7 @@ IdentityFile /home/%s/.ssh/%s
|
||||
|
||||
tempStatusPath = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||
|
||||
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||
execPath = execPath + " switchServer --phpVersion '" + phpVersion + "' --server " + str(
|
||||
server) + " --virtualHostName " + domainName + " --tempStatusPath " + tempStatusPath
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
||||
Reference in New Issue
Block a user