remote backup error reporting fixed

This commit is contained in:
unknown
2023-08-23 10:44:02 +05:00
parent 25ee799909
commit 488bb11ced
3 changed files with 59 additions and 5 deletions

View File

@@ -422,11 +422,17 @@ def remoteTransfer(request):
ipAddress = data['ipAddress']
accountsToTransfer = data['accountsToTransfer']
port = data['port']
logging.writeToFile('port on server B-------------- %s' % str(port))
if hashPassword.check_password(admin.password, password):
dir = str(randint(1000, 9999))
##
##save this port into file
portpath = "/home/cyberpanel/remote_port"
writeToFile = open(portpath, 'w')
writeToFile.writelines(port)
writeToFile.close()
mailUtilities.checkHome()
path = "/home/cyberpanel/accounts-" + str(randint(1000, 9999))
@@ -532,6 +538,7 @@ def FetchRemoteTransferStatus(request):
command = f"cat {dir}"
status = ProcessUtilities.outputExecutioner(command)
if hashPassword.check_password(admin.password, password):
final_json = json.dumps({'fetchStatus': 1, 'error_message': "None", "status": status})