updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / ntpdate / ntpdate.rc
blob098819ac97facabe3103fa860b40539d99980fa0
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/ntpdate
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 &>/dev/null
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
32 # vim:set ts=2 sw=2 ft=sh et: