#!/bin/sh
### BEGIN INIT INFO
# Provides:		ntp
# Required-Start:	$remote_fs $syslog $networking
# Required-Stop:	$remote_fs $syslog
# Default-Start:	2 3 4 5
# Default-Stop:		1
# Short-Description:	NTP client
### END INIT INFO
#

DAEMON=/usr/sbin/ntpclient
NAME=ntpclient
DESC="NTP client"

case "$1" in
  start)
	echo -n "Starting $DESC: "
	/usr/sbin/ntpclient -s -l -q 0 -h ntp.logitech.com > /dev/null &
	echo "$NAME."
	;;
  stop)
	echo -n "Stopping $DESC: "
	killall -q ntpclient
	echo "$NAME."
	;;
  restart|force-reload)
	echo -n "Restarting $DESC: "
	killall -q ntpclient
	sleep 1
	/usr/sbin/ntpclient -s -l -q 0 -h ntp.logitech.com > /dev/null &
	echo "$NAME."
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0
