diff --git a/CLScript/CLMain.py b/CLScript/CLMain.py index 4761b01c5..492207f48 100644 --- a/CLScript/CLMain.py +++ b/CLScript/CLMain.py @@ -4,8 +4,8 @@ class CLMain(): def __init__(self): self.path = '/usr/local/CyberCP/version.txt' #versionInfo = json.loads(open(self.path, 'r').read()) - self.version = '2.1' - self.build = '2' + self.version = '2.3' + self.build = '1' ipFile = "/etc/cyberpanel/machineIP" f = open(ipFile) diff --git a/CyberCP/secMiddleware.py b/CyberCP/secMiddleware.py index 39de0f2c6..47fd6a4bd 100755 --- a/CyberCP/secMiddleware.py +++ b/CyberCP/secMiddleware.py @@ -72,7 +72,7 @@ class secMiddleware: final_json = json.dumps(final_dic) return HttpResponse(final_json) - if request.build_absolute_uri().find('api/verifyConn') > -1 or request.build_absolute_uri().find('webhook') > -1 or request.build_absolute_uri().find('saveSpamAssassinConfigurations') > -1 or request.build_absolute_uri().find('docker') > -1 or request.build_absolute_uri().find('cloudAPI') > -1 or request.build_absolute_uri().find('verifyLogin') > -1 or request.build_absolute_uri().find('submitUserCreation') > -1: + if request.build_absolute_uri().find('api/remoteTransfer') > -1 or request.build_absolute_uri().find('api/verifyConn') > -1 or request.build_absolute_uri().find('webhook') > -1 or request.build_absolute_uri().find('saveSpamAssassinConfigurations') > -1 or request.build_absolute_uri().find('docker') > -1 or request.build_absolute_uri().find('cloudAPI') > -1 or request.build_absolute_uri().find('verifyLogin') > -1 or request.build_absolute_uri().find('submitUserCreation') > -1: continue if key == 'key' or key == 'cert' or key == 'recordContentAAAA' or key == 'backupDestinations' or key == 'ports' \ or key == 'imageByPass' or key == 'passwordByPass' or key == 'cronCommand' \ diff --git a/api/views.py b/api/views.py index 8c61fa691..257648f27 100755 --- a/api/views.py +++ b/api/views.py @@ -435,10 +435,14 @@ def remoteTransfer(request): ## Accounts to transfer is a path to file, containing accounts. + execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py" - execPath = execPath + " remoteTransfer --ipAddress " + ipAddress + " --dir " + dir + " --accountsToTransfer " + path + execPath = execPath + " remoteTransfer --ipAddress " + ipAddress.rstrip('\n') + " --dir " + dir + " --accountsToTransfer " + path ProcessUtilities.popenExecutioner(execPath) + if os.path.exists('/usr/local/CyberCP/debug'): + logging.writeToFile('Repor of %s' % repr(execPath)) + return HttpResponse(json.dumps({"transferStatus": 1, "dir": dir})) ## diff --git a/backup/backupManager.py b/backup/backupManager.py index c4bc4a788..c42a80d32 100755 --- a/backup/backupManager.py +++ b/backup/backupManager.py @@ -1163,6 +1163,10 @@ class BackupManager: r = requests.post(url, data=finalData, verify=False) + if os.path.exists('/usr/local/CyberCP/debug'): + message = 'Remote transfer initiation status: %s' % (r.text) + logging.CyberCPLogFileWriter.writeToFile(message) + data = json.loads(r.text) if data['transferStatus'] == 1: diff --git a/backup/templates/backup/googleDrive.html b/backup/templates/backup/googleDrive.html index 175a20508..50549d0c7 100755 --- a/backup/templates/backup/googleDrive.html +++ b/backup/templates/backup/googleDrive.html @@ -114,7 +114,7 @@
- +