updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / ntpdate-dev / ntpdate
blob643ae1907e21abb7be7531dbdfcc52967051aef3
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/ntp-client.conf
7 case "$1" in
8 start)
9 stat_busy "Starting NTP Client"
10 /usr/bin/ntpdate $NTP_CLIENT_OPTION -t $NTPCLIENT_TIMEOUT $NTP_CLIENT_SERVER > /dev/null 2>&1
11 if [ $? -gt 0 ]; then
12 stat_fail
13 else
14 add_daemon ntpdate
15 stat_done
18 stop)
19 stat_busy "Stopping NTP Client"
20 rm_daemon ntpdate
21 stat_done
23 restart)
24 $0 stop
25 sleep 1
26 $0 start
29 echo "usage: $0 {start|stop|restart}"
30 esac