add comment explaining cl_Freq/20
[yacron.git] / extra / crond.rc
blobae3b47f457c1c03c28ff4d7ce84c652bac4fee92
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/sbin/crond`
7 case "$1" in
8 start)
9 stat_busy "Starting Cron Daemon"
10 [ -z "$PID" ] && /usr/sbin/crond -S -l info
11 # [ -z "$PID" ] && /usr/sbin/crond -L /var/log/cron.log # alternate (not handled by syslog-ng)
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 PID=`pidof -o %PPID /usr/sbin/crond`
17 echo $PID >/var/run/crond.pid
18 add_daemon crond
19 stat_done
22 stop)
23 stat_busy "Stopping Cron Daemon"
24 [ ! -z "$PID" ] && kill $PID &>/dev/null
25 if [ $? -gt 0 ]; then
26 stat_fail
27 else
28 rm_daemon crond
29 stat_done
32 restart)
33 $0 stop
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac
39 exit 0