Skip to content

Commit

Permalink
crontab fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
serghey-rodin committed Sep 17, 2013
1 parent ef11c37 commit 8cdfe2b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions upd/fix_cron.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Check if there is no crontab
if [ ! -e "/var/spool/cron" ]; then
exit
fi

# Fix ownership and permissions
for crn_tab in $(ls /var/spool/cron/); do
chown $crn_tab:$crn_tab /var/spool/cron/$crn_tab
chmod 600 /var/spool/cron/$crn_tab
done

exit

0 comments on commit 8cdfe2b

Please sign in to comment.