mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 00:06:09 +01:00
remote backup error reporting fixed
This commit is contained in:
11
api/views.py
11
api/views.py
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user