-
-
Save KyonLi/ff4d4acb1b5bf22c2ef2444c95c56de2 to your computer and use it in GitHub Desktop.
optware cron startup script that also sets correct file permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Startup script for optware cron | |
# | |
# Fix file permissions | |
# Cron throws an error if these files are anything other than RW by owner | |
chmod 600 /opt/etc/crontab | |
chmod -R 600 /opt/etc/cron.d/ | |
# Stop myself if running | |
PIDFILE=/opt/var/run/cron.pid | |
[ -f ${PIDFILE} ] && kill `cat ${PIDFILE}` | |
/opt/sbin/cron |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment