mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-13 16:56:09 +01:00
bug fix: cron
This commit is contained in:
@@ -70,6 +70,8 @@ class CronUtil:
|
||||
|
||||
counter = counter + 1
|
||||
|
||||
writeToFile.close()
|
||||
|
||||
print("1," + removedLine)
|
||||
except BaseException as msg:
|
||||
print("0," + str(msg))
|
||||
@@ -85,10 +87,6 @@ class CronUtil:
|
||||
with open(cronPath, "a") as file:
|
||||
file.write(finalCron + "\n")
|
||||
|
||||
if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu:
|
||||
command = 'chmod 600 %s' % (cronPath)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
print("1,None")
|
||||
except BaseException as msg:
|
||||
print("0," + str(msg))
|
||||
|
||||
@@ -1604,6 +1604,11 @@ class WebsiteManager:
|
||||
execPath = execPath + " addNewCron --externalApp " + website.externalApp + " --finalCron '" + finalCron + "'"
|
||||
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
|
||||
|
||||
|
||||
if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu:
|
||||
command = 'chmod 600 %s' % (cronPath)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
CronUtil.CronPrem(0)
|
||||
|
||||
if output.find("1,") > -1:
|
||||
|
||||
Reference in New Issue
Block a user