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"
|
2024-07-21 16:27:05 +00:00
|
|
|
entry="*/$BUILDFREQ * * * * $target"
|
2024-06-27 22:32:10 +00:00
|
|
|
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
|