diff --git a/fcron/.md5sum b/fcron/.md5sum index 4d3f5eae5..cd550a74f 100644 --- a/fcron/.md5sum +++ b/fcron/.md5sum @@ -1,3 +1,3 @@ -e11816b7a028e356626e4ccc359b0c95 fcron +24abad262c8fc12608a87b72e838153a fcron 4b031c2fba32a98fa814d1557158b0e9 fcron-3.2.0.src.tar.gz 0153ce1b5ac57ab970abafbde26a9b62 systab.orig diff --git a/fcron/Pkgfile b/fcron/Pkgfile index 3680112f6..be2de7821 100644 --- a/fcron/Pkgfile +++ b/fcron/Pkgfile @@ -5,7 +5,7 @@ name=fcron version=3.2.0 -release=1 +release=2 source=(http://fcron.free.fr/archives/$name-$version.src.tar.gz fcron systab.orig) diff --git a/fcron/fcron b/fcron/fcron index 3eaf92715..5c4525930 100644 --- a/fcron/fcron +++ b/fcron/fcron @@ -3,23 +3,39 @@ # /etc/rc.d/fcron: start/stop fcron daemon # +SSD=/sbin/start-stop-daemon +PROG=/usr/sbin/fcron +PID=/var/run/fcron.pid +OPTS="--background" + case $1 in start) - /usr/sbin/fcron -b + $SSD --start --pidfile $PID --exec $PROG -- $OPTS if [ ! -f /var/spool/fcron/systab ]; then /usr/bin/fcrontab -u systab -z fi ;; stop) - killall -q /usr/sbin/fcron + $SSD --stop --retry 10 --pidfile $PID ;; restart) $0 stop - sleep 2 $0 start ;; +reload) + $SSD --stop --signal USR1 --pidfile $PID + ;; +status) + $SSD --status --pidfile $PID + case $? in + 0) echo "$PROG is running" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; *) - echo "usage: $0 [start|stop|restart]" + echo "usage: $0 [start|stop|restart|reload|status]" ;; esac