ntp.sysvinit: fix 'restart' (don't exit on failed commands with set -e)
This commit is contained in:
parent
193508d257
commit
2e81da88be
|
@ -3,8 +3,6 @@
|
||||||
# System-V init script for the openntp daemon
|
# System-V init script for the openntp daemon
|
||||||
#
|
#
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
DESC="network time protocol daemon"
|
DESC="network time protocol daemon"
|
||||||
NAME=ntpd
|
NAME=ntpd
|
||||||
|
@ -41,11 +39,10 @@ case "$1" in
|
||||||
start-stop-daemon -K -q -n $NAME -s 1
|
start-stop-daemon -K -q -n $NAME -s 1
|
||||||
echo "done."
|
echo "done."
|
||||||
;;
|
;;
|
||||||
restart) echo -n "Restarting $DESC: $NAME"
|
restart) echo "Restarting $DESC: $NAME"
|
||||||
start-stop-daemon -K -q -n $NAME
|
$0 stop
|
||||||
sleep 1
|
sleep 1
|
||||||
start-stop-daemon -S -q -x $DAEMON
|
$0 start
|
||||||
echo "."
|
|
||||||
;;
|
;;
|
||||||
*) echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
*) echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue