mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-17 18:51:04 +01:00
bug fix: remove scheduled backups
This commit is contained in:
@@ -757,16 +757,19 @@ class BackupManager:
|
|||||||
findTxt = ""
|
findTxt = ""
|
||||||
|
|
||||||
if backupDest == "Home" and backupFreq == "Daily":
|
if backupDest == "Home" and backupFreq == "Daily":
|
||||||
findTxt = "0-6"
|
findTxt = "0 3"
|
||||||
elif backupDest == "Home" and backupFreq == "Weekly":
|
elif backupDest == "Home" and backupFreq == "Weekly":
|
||||||
findTxt = "* 3"
|
findTxt = "0 0"
|
||||||
elif backupDest != "Home" and backupFreq == "Daily":
|
elif backupDest != "Home" and backupFreq == "Daily":
|
||||||
findTxt = "0-6"
|
findTxt = "0 3"
|
||||||
elif backupDest != "Home" and backupFreq == "Weekly":
|
elif backupDest != "Home" and backupFreq == "Weekly":
|
||||||
findTxt = "* 3"
|
findTxt = "0 0"
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(findTxt)
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(backupFreq)
|
||||||
|
|
||||||
path = "/etc/crontab"
|
path = "/etc/crontab"
|
||||||
|
|
||||||
command = "cat " + path
|
command = "cat " + path
|
||||||
@@ -776,7 +779,7 @@ class BackupManager:
|
|||||||
writeToFile = open(tempCronPath, 'w')
|
writeToFile = open(tempCronPath, 'w')
|
||||||
|
|
||||||
for items in output:
|
for items in output:
|
||||||
if items.find(findTxt) > -1 and items.find("backupScheduleLocal.py") > -1:
|
if (items.find(findTxt) > -1 and items.find("backupScheduleLocal.py") > -1) or (items.find(findTxt) > -1 and items.find('backupSchedule.py')):
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
writeToFile.writelines(items + '\n')
|
writeToFile.writelines(items + '\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user