Avoid adding to crontab multiple times
This commit is contained in:
parent
e4e6da1bca
commit
682960d450
@ -9,7 +9,8 @@ if [ "$BUILDFREQ" == "" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the pull script regularly
|
# Run the pull script regularly
|
||||||
echo "*/$BUILDFREQ * * * * /aux/pull-n-build.sh" >> /var/spool/cron/crontabs/root
|
cmd="$BUILDFREQ * * * * /aux/pull-n-build.sh"
|
||||||
|
grep "$cmd" /var/spool/cron/crontabs/root || echo "$cmd" >> /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