Skip to content

Commit

Permalink
bug fix: cron path for ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Feb 11, 2020
1 parent 0d54457 commit c529e0d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plogical/cronUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,20 @@ def CronPrem(mode):
cronParent = '/var/spool/cron'
commandT = 'chmod 755 %s' % (cronParent)
ProcessUtilities.executioner(commandT, 'root')

if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu:
command = 'chmod 755 /var/spool/cron/crontabs'
ProcessUtilities.outputExecutioner(command)

else:
cronParent = '/var/spool/cron'
commandT = 'chmod 700 %s' % (cronParent)
ProcessUtilities.executioner(commandT, 'root')

if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu:
command = 'chmod 1730 /var/spool/cron/crontabs'
ProcessUtilities.outputExecutioner(command)



def main():
Expand Down

0 comments on commit c529e0d

Please sign in to comment.