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
|
fi
|
||||||
|
|
||||||
# Run the pull script regularly
|
# Run the pull script regularly
|
||||||
cmd="$BUILDFREQ * * * * /aux/pull-n-build.sh"
|
target="/aux/pull-n-build.sh"
|
||||||
grep "$cmd" /var/spool/cron/crontabs/root || echo "$cmd" >> /var/spool/cron/crontabs/root
|
entry="$BUILDFREQ * * * * $target"
|
||||||
|
grep "$target" /var/spool/cron/crontabs/root || echo "$entry" >> /var/spool/cron/crontabs/root
|
||||||
|
|
||||||
# start cron daemon (goes into background)
|
# start cron daemon (goes into background)
|
||||||
crond
|
crond
|
||||||
|
Loading…
Reference in New Issue
Block a user