check if backup process actually running

This commit is contained in:
Usman Nasir
2020-05-30 12:35:28 +05:00
parent 8213708921
commit 55eff1a850

View File

@@ -270,7 +270,6 @@ class backupSchedule:
output = ProcessUtilities.outputExecutioner('ps aux') output = ProcessUtilities.outputExecutioner('ps aux')
if output.find('/usr/local/CyberCP/plogical/backupSchedule.py') > -1 and output.find(pid) > -1: if output.find('/usr/local/CyberCP/plogical/backupSchedule.py') > -1 and output.find(pid) > -1:
pid = open(backupSchedule.runningPath, 'r').read()
print( print(
'\n\nRemote backup is already running with PID: %s. If you want to run again kindly kill the backup process: \n\n kill -9 %s.\n\n' % ( '\n\nRemote backup is already running with PID: %s. If you want to run again kindly kill the backup process: \n\n kill -9 %s.\n\n' % (
pid, pid)) pid, pid))