Fix: avoid duplicate cron entries when switching build frequency
This commit is contained in:
parent
682960d450
commit
737b529b8d
@ -9,8 +9,9 @@ if [ "$BUILDFREQ" == "" ]; then
|
||||
fi
|
||||
|
||||
# Run the pull script regularly
|
||||
cmd="$BUILDFREQ * * * * /aux/pull-n-build.sh"
|
||||
grep "$cmd" /var/spool/cron/crontabs/root || echo "$cmd" >> /var/spool/cron/crontabs/root
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user