]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/busybox/files/busybox-cron
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / busybox / files / busybox-cron
1 #!/bin/sh
2 DAEMON=/usr/sbin/crond
3 NAME=crond
4 DESC="Busybox Periodic Command Scheduler"
5 ARGS="-c /etc/cron/crontabs"
6
7 test -f $DAEMON || exit 0
8
9 set -e
10
11 case "$1" in
12     start)
13         echo -n "starting $DESC: $NAME... "
14         start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
15         echo "done."
16         ;;
17     stop)
18         echo -n "stopping $DESC: $NAME... "
19         start-stop-daemon -K -n $NAME
20         echo "done."
21         ;;
22     restart)
23         echo -n "restarting $DESC: $NAME... "
24         $0 stop
25         $0 start
26         echo "done."
27         ;;
28     reload)
29         echo -n "reloading $DESC: $NAME... "
30         killall -HUP $(basename ${DAEMON})
31         echo "done."
32         ;;
33     *)
34         echo "Usage: $0 {start|stop|restart|reload}"
35         exit 1
36         ;;
37 esac
38
39 exit 0