blogker/init/cron.sh

17 lines
318 B
Bash
Raw Normal View History

#!/bin/sh
# stop on error
set -e
if [ "$BUILDFREQ" == "" ]; then
# set default
BUILDFREQ=10
fi
# Run the pull script regularly
2023-11-29 16:30:10 +00:00
cmd="$BUILDFREQ * * * * /aux/pull-n-build.sh"
grep "$cmd" /var/spool/cron/crontabs/root || echo "$cmd" >> /var/spool/cron/crontabs/root
# start cron daemon (goes into background)
crond