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