blogker/init/cron.sh

18 lines
342 B
Bash
Executable File

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