3 # Start only if Crontab is enabled
4 .
###ROOT###/etc/omd/site.conf
5 if [ "$CONFIG_CRONTAB" != on
] ; then
10 MERGECRONTABS
="###ROOT###/bin/merge-crontabs"
11 CROND
="###ROOT###/etc/cron.d/*"
12 CRONTAB
=`which crontab`
17 # Workaround for http://omdistro.org/issues/157
18 if [ `id -u` -eq "0" ]; then
19 CRONTAB_OPTS
="-u ###SITE###"
22 # See how we were called.
26 echo -en "Initializing Crontab..."
27 ${MERGECRONTABS} ${CROND} |
$CRONTAB $CRONTAB_OPTS - > /dev
/null
38 echo -n "Removing Crontab..."
39 $CRONTAB $CRONTAB_OPTS -r ||
exit 0
49 $CRONTAB $CRONTAB_OPTS -l >/dev
/null
2>&1
51 echo "crontab initialized"
54 echo "crontab is empty"
59 echo "Usage: crontab {start|stop|restart|reload|status}"