diff --git a/IncBackups/views.py b/IncBackups/views.py index 9ba6b1afc..4739c04cb 100644 --- a/IncBackups/views.py +++ b/IncBackups/views.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utaddDestinationf-8 -*- from django.shortcuts import render from plogical.acl import ACLManager @@ -102,8 +102,14 @@ def addDestination(request): execPath = execPath + " submitDestinationCreation --ipAddress " + ipAddress + " --password " \ + password + " --port " + port + if os.path.exists(ProcessUtilities.debugPath): + logging.writeToFile(execPath) + output = ProcessUtilities.outputExecutioner(execPath) + if os.path.exists(ProcessUtilities.debugPath): + logging.writeToFile(output) + if output.find('1,') > -1: content = '%s\n%s' % (ipAddress, port) diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index d833ba5f6..4348c73f2 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -159,6 +159,7 @@ check_root echo -e "\nChecking OS..." OUTPUT=$(cat /etc/*release) + if echo $OUTPUT | grep -q "CentOS Linux 7" ; then echo -e "\nDetecting CentOS 7.X...\n" SERVER_OS="CentOS7" diff --git a/plogical/backupSchedule.py b/plogical/backupSchedule.py index 0a87c8e04..eba989f92 100755 --- a/plogical/backupSchedule.py +++ b/plogical/backupSchedule.py @@ -196,6 +196,9 @@ class backupSchedule: command = "sudo scp -o StrictHostKeyChecking=no -P "+port+" -i /root/.ssh/cyberpanel " + backupPath + " " + user + "@" + IPAddress+":~/backup/" + ipAddressLocal + "/" + time.strftime("%a-%b") + "/" subprocess.call(shlex.split(command), stdout=writeToFile) + if os.path.exists(ProcessUtilities.debugPath): + logging.CyberCPLogFileWriter.writeToFile(command) + ## Remove backups already sent to remote destinations os.remove(backupPath) diff --git a/plogical/backupUtilities.py b/plogical/backupUtilities.py index 59f62b16f..882e32dfb 100755 --- a/plogical/backupUtilities.py +++ b/plogical/backupUtilities.py @@ -493,7 +493,6 @@ class backupUtilities: items.status = 1 items.size = totalSize items.save() - logging.CyberCPLogFileWriter.writeToFile(' again size: %s' % (totalSize)) except BaseException as msg: logging.CyberCPLogFileWriter.writeToFile('%s. [backupRoot:499]' % str(msg)) for items in backupObs: diff --git a/static/backup/backup.js b/static/backup/backup.js index 9c158422b..a41fffb41 100644 --- a/static/backup/backup.js +++ b/static/backup/backup.js @@ -416,7 +416,7 @@ app.controller('restoreWebsiteControl', function ($scope, $http, $timeout) { }); -//*** Resotre site ends here ***/// +//*** Restore site ends here ***/// ///** Backup Destination ***// @@ -448,6 +448,7 @@ app.controller('backupDestinations', function ($scope, $http, $timeout) { var data = { IPAddress: $scope.IPAddress, password: $scope.password, + user: $scope.user, backupSSHPort: $scope.backupSSHPort, }; diff --git a/static/filemanager/js/fileManager.js b/static/filemanager/js/fileManager.js index 725224dbb..19e175118 100644 --- a/static/filemanager/js/fileManager.js +++ b/static/filemanager/js/fileManager.js @@ -1479,7 +1479,6 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader, // Download files $scope.downloadFile = function () { - url = "/filemanager/downloadFile"; var downloadURL = $scope.currentPath + "/" + allFilesAndFolders[0]; window.location.href = url + '?domainName=' + domainName + '&fileToDownload=' + downloadURL;