From f3ab3e5baa4efd4e2c6f31856989cbae005511ae Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Wed, 10 Jun 2020 13:29:07 +0500 Subject: [PATCH] bug fix" minor improvement to create local backup --- plogical/backupSchedule.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plogical/backupSchedule.py b/plogical/backupSchedule.py index 12e0eed2a..7bccca4de 100755 --- a/plogical/backupSchedule.py +++ b/plogical/backupSchedule.py @@ -72,6 +72,8 @@ class backupSchedule: time.sleep(5) schedulerPath = '/home/cyberpanel/%s-backup.txt' % (virtualHost) + killCounter = 0 + while (1): diff = datetime.now() - startingTime @@ -118,8 +120,11 @@ class backupSchedule: else: return 0, 'Backup process killed without reporting any error.' else: - - return 0, 'Backup process killed without reporting any error.' + if killCounter == 1: + return 0, 'Backup process killed without reporting any error.' + else: + time.sleep(10) + killCounter = 1 ## file name read ends