Last active
April 20, 2018 02:17
-
-
Save cmprescott/05a674b50964900dcd29 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