bug fix cron on ubuntu

This commit is contained in:
Usman Nasir
2020-03-25 12:00:32 +05:00
parent 595fc6f525
commit db17cd1dd3
3 changed files with 13 additions and 0 deletions

View File

@@ -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))

View File

@@ -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):