2007-01-12 08:23:22 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# /etc/rc.d/ntpd: start/stop ntp daemon
|
|
|
|
#
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
start)
|
2014-06-25 21:06:39 +02:00
|
|
|
(/usr/bin/ntpd -u ntp:ntp -gqx
|
|
|
|
/usr/bin/ntpd -u ntp:ntp) &
|
2007-01-12 08:23:22 +01:00
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
/sbin/hwclock -w
|
|
|
|
killall -q /usr/bin/ntpd
|
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
$0 stop && sleep 3 && $0 start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "usage: $0 [start|stop|restart]"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# End of file
|