diff options
Diffstat (limited to 'contrib/ntp/html/hints/solaris.xtra.S99ntpd')
-rw-r--r-- | contrib/ntp/html/hints/solaris.xtra.S99ntpd | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/ntp/html/hints/solaris.xtra.S99ntpd b/contrib/ntp/html/hints/solaris.xtra.S99ntpd new file mode 100644 index 0000000..33662ba --- /dev/null +++ b/contrib/ntp/html/hints/solaris.xtra.S99ntpd @@ -0,0 +1,20 @@ +#!/bin/sh +if [ $1 = "start" ]; then + if [ -x /usr/local/bin/xntpd ]; then + echo "Starting NTP daemon, takes about 1 minute... " + # The following line is unnecessary if you turn off + # dosynctodr in /etc/system. + /usr/local/bin/tickadj -s + /usr/local/bin/ntpdate -v server1 server2 + sleep 5 + /usr/local/bin/xntpd + fi +else + if [ $1 = "stop" ]; then + pid=`/usr/bin/ps -e | /usr/bin/grep xntpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` + if [ "${pid}" != "" ]; then + echo "Stopping Network Time Protocol daemon " + /usr/bin/kill ${pid} + fi + fi +fi |