mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-15 20:12:06 +01:00
bug fix cron on ubuntu
This commit is contained in:
@@ -1702,6 +1702,11 @@ imap_folder_list_limit = 0
|
||||
cronFile.write(content)
|
||||
cronFile.close()
|
||||
|
||||
if not os.path.exists(CentOSPath):
|
||||
command = 'chmod 600 %s' % (cronPath)
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
|
||||
if self.distro == centos or self.distro == cent8:
|
||||
command = 'systemctl restart crond.service'
|
||||
else:
|
||||
|
||||
@@ -85,6 +85,10 @@ 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))
|
||||
|
||||
@@ -2133,6 +2133,10 @@ vmail
|
||||
writeToFile.write(content)
|
||||
writeToFile.close()
|
||||
|
||||
if not os.path.exists(CentOSPath):
|
||||
command = 'chmod 600 %s' % (cronPath)
|
||||
Upgrade.executioner(command, 0)
|
||||
|
||||
@staticmethod
|
||||
def upgrade(branch):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user