HEX
Server: Apache
System: FreeBSD www860.sakura.ne.jp 13.0-RELEASE-p14 FreeBSD 13.0-RELEASE-p14 #2: Mon Dec 9 13:54:55 JST 2024 root@www5301.sakura.ne.jp:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
User: yoyo0427 (1306)
PHP: 8.3.8
Disabled: NONE
Upload Files
File: //usr/share/doc/ntp/hints/solaris.xtra.S99ntpd
#!/bin/sh
if [ $1 = "start" ]; then
        if [ -x /usr/local/bin/xntpd ]; then
                echo "Starting NTP daemon, takes about 1 minute... "
		# dosynctodr may need to be left alone as of with Solaris 2.6
		# 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