fcron: new rc script
This commit is contained in:
parent
eb032fcc58
commit
960b4ed6d8
@ -1,3 +1,3 @@
|
|||||||
e11816b7a028e356626e4ccc359b0c95 fcron
|
24abad262c8fc12608a87b72e838153a fcron
|
||||||
4b031c2fba32a98fa814d1557158b0e9 fcron-3.2.0.src.tar.gz
|
4b031c2fba32a98fa814d1557158b0e9 fcron-3.2.0.src.tar.gz
|
||||||
0153ce1b5ac57ab970abafbde26a9b62 systab.orig
|
0153ce1b5ac57ab970abafbde26a9b62 systab.orig
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
name=fcron
|
name=fcron
|
||||||
version=3.2.0
|
version=3.2.0
|
||||||
release=1
|
release=2
|
||||||
source=(http://fcron.free.fr/archives/$name-$version.src.tar.gz
|
source=(http://fcron.free.fr/archives/$name-$version.src.tar.gz
|
||||||
fcron systab.orig)
|
fcron systab.orig)
|
||||||
|
|
||||||
|
24
fcron/fcron
24
fcron/fcron
@ -3,23 +3,39 @@
|
|||||||
# /etc/rc.d/fcron: start/stop fcron daemon
|
# /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
|
case $1 in
|
||||||
start)
|
start)
|
||||||
/usr/sbin/fcron -b
|
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
|
||||||
if [ ! -f /var/spool/fcron/systab ]; then
|
if [ ! -f /var/spool/fcron/systab ]; then
|
||||||
/usr/bin/fcrontab -u systab -z
|
/usr/bin/fcrontab -u systab -z
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
killall -q /usr/sbin/fcron
|
$SSD --stop --retry 10 --pidfile $PID
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
$0 stop
|
$0 stop
|
||||||
sleep 2
|
|
||||||
$0 start
|
$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
|
esac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user