summaryrefslogtreecommitdiff
path: root/packages/ntp/files/ntp
blob: e91a52869a6eb2b3f9ac1cd6487328c2933350b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh

FLAGS="defaults 23"

test -f /usr/bin/ntpd || exit 0

case "$1" in
	start)
		echo -n "Starting NTP server: ntpd"
  		start-stop-daemon --start --quiet --exec /usr/bin/ntpd
		echo "."
  		;;
	stop)
		echo -n "Stopping NTP server: ntpd"
  		start-stop-daemon --stop --quiet --exec /usr/bin/ntpd
		echo "."
  		;;
	restart|force-reload)
		echo -n "Restarting NTP server: ntpd... "
  		start-stop-daemon --stop --quiet --exec /usr/bin/ntpd
  		sleep 2
  		start-stop-daemon --start --quiet --exec /usr/bin/ntpd
		echo "done."
  		;;
	*)
  		echo "Usage: /etc/init.d/ntp {start|stop|restart|force-reload}"
  		exit 1
		;;
esac

exit 0