Create new cron file if does not exists for user

This commit is contained in:
jetchirag
2020-06-21 05:03:39 +05:30
committed by GitHub
parent 73a17998c1
commit d25c5ab6a6

View File

@@ -739,7 +739,7 @@ class cPanelImporter:
else: else:
localCronPath = "/var/spool/cron/crontabs/" + self.externalApp localCronPath = "/var/spool/cron/crontabs/" + self.externalApp
localCronFile = open(localCronPath, "r+") localCronFile = open(localCronPath, "a+")
commandT = 'touch %s' % (localCronPath) commandT = 'touch %s' % (localCronPath)
ProcessUtilities.executioner(commandT, 'root') ProcessUtilities.executioner(commandT, 'root')