2014-06-11 13:33:15 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
[ -x /usr/sbin/ntpd ] || exit 0
|
|
|
|
[ -f /etc/ntpd.conf ] || exit 0
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
echo -n "Starting openntpd: "
|
|
|
|
start-stop-daemon -S -x /usr/sbin/ntpd
|
2014-10-26 18:41:43 +01:00
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
2014-06-11 13:33:15 +02:00
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
echo -n "Stopping openntpd: "
|
|
|
|
start-stop-daemon -K -x /usr/sbin/ntpd
|
2014-10-26 18:41:43 +01:00
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
2014-06-11 13:33:15 +02:00
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
"$0" stop
|
|
|
|
sleep 1
|
|
|
|
"$0" start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
|
|
;;
|
|
|
|
esac
|