mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
bug fix: cron path for ubuntu
This commit is contained in:
@@ -77,9 +77,12 @@ class CronUtil:
|
||||
@staticmethod
|
||||
def addNewCron(externalApp, finalCron):
|
||||
try:
|
||||
CronPath = '/var/spool/cron/%s' % (externalApp)
|
||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||
cronPath = "/var/spool/cron/" + externalApp
|
||||
else:
|
||||
cronPath = "/var/spool/cron/crontabs/" + externalApp
|
||||
|
||||
with open(CronPath, "a") as file:
|
||||
with open(cronPath, "a") as file:
|
||||
file.write(finalCron + "\n")
|
||||
|
||||
print("1,None")
|
||||
|
||||
Reference in New Issue
Block a user