fcron: optimize start script a bit
This commit is contained in:
parent
9c28d84ea2
commit
8bf44114ae
@ -1,3 +1,3 @@
|
||||
50b4de0f8bbbaccb87de9157e391a8e6 fcron
|
||||
7b83466279d19654fc7f6d259439cd33 fcron
|
||||
4b031c2fba32a98fa814d1557158b0e9 fcron-3.2.0.src.tar.gz
|
||||
0153ce1b5ac57ab970abafbde26a9b62 systab.orig
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
name=fcron
|
||||
version=3.2.0
|
||||
release=3
|
||||
release=4
|
||||
source=(http://fcron.free.fr/archives/$name-$version.src.tar.gz
|
||||
fcron systab.orig)
|
||||
|
||||
|
@ -11,12 +11,14 @@ OPTS="--background"
|
||||
case $1 in
|
||||
start)
|
||||
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
|
||||
if [ ! -f /var/spool/fcron/systab ]; then
|
||||
/usr/bin/fcrontab -u systab -z
|
||||
RETVAL=$?
|
||||
if [ $RETVAL -eq 0 && ! -f /var/spool/fcron/systab ]; then
|
||||
/usr/bin/fcrontab -u systab -z
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop --retry 10 --pidfile $PID
|
||||
RETVAL=$?
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
@ -24,6 +26,7 @@ restart)
|
||||
;;
|
||||
reload)
|
||||
$SSD --stop --signal USR1 --pidfile $PID
|
||||
RETVAL=$?
|
||||
;;
|
||||
status)
|
||||
$SSD --status --pidfile $PID
|
||||
@ -39,4 +42,6 @@ status)
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
||||
# End of file
|
||||
|
Loading…
Reference in New Issue
Block a user