kmscube: new package
[buildroot-gz.git] / package / openntpd / S49ntp
blobc211ac835ed71dbc10026a90a3bd5277b70292e1
1 #!/bin/sh
3 [ -x /usr/sbin/ntpd ] || exit 0
4 [ -f /etc/ntpd.conf ] || exit 0
6 case "$1" in
7 start)
8 printf "Starting openntpd: "
9 start-stop-daemon -S -x /usr/sbin/ntpd -- -s -p /run/ntpd.pid
10 [ $? = 0 ] && echo "OK" || echo "FAIL"
12 stop)
13 printf "Stopping openntpd: "
14 start-stop-daemon -K -q -p /run/ntpd.pid
15 [ $? = 0 ] && echo "OK" || echo "FAIL"
17 restart)
18 "$0" stop
19 sleep 1
20 "$0" start
23 echo "Usage: $0 {start|stop|restart}"
25 esac