diff options
author | Juergen Daubert <jue@jue.li> | 2015-03-05 11:09:54 +0100 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2015-03-05 11:09:54 +0100 |
commit | 960b4ed6d835c6e32984b11dd0550eb314b97e35 (patch) | |
tree | 24982d17434a814b818293bcd51fa5699a6573ca /fcron | |
parent | eb032fcc58deece573959c0199c6912a3c5963ea (diff) | |
download | opt-960b4ed6d835c6e32984b11dd0550eb314b97e35.tar.gz opt-960b4ed6d835c6e32984b11dd0550eb314b97e35.tar.xz |
fcron: new rc script
Diffstat (limited to 'fcron')
-rw-r--r-- | fcron/.md5sum | 2 | ||||
-rw-r--r-- | fcron/Pkgfile | 2 | ||||
-rw-r--r-- | fcron/fcron | 24 |
3 files changed, 22 insertions, 6 deletions
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 |