bug fix: remote backup and backup restore

This commit is contained in:
Usman Nasir
2022-04-28 16:40:22 +05:00
parent 00c70bfe18
commit 80a08d4966
6 changed files with 60 additions and 6 deletions

View File

@@ -225,7 +225,8 @@ class ProcessUtilities(multi.Thread):
command = 'sudo %s' % (command)
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(ProcessUtilities.token + command)
if command.find('cat') == -1:
logging.writeToFile(ProcessUtilities.token + command)
if dir == None:
sock.sendall((ProcessUtilities.token + command).encode('utf-8'))
@@ -238,8 +239,11 @@ class ProcessUtilities(multi.Thread):
else:
command = '%s-u %s -d %s %s' % (ProcessUtilities.token, user, dir, command)
command = command.replace('sudo', '')
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(command)
if command.find('cat') == -1:
logging.writeToFile(command)
sock.sendall(command.encode('utf-8'))