freebsd-dev/contrib/ntp/scripts/deprecated/ntp-restart
Cy Schubert 2b15cb3d09 MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by:	roberto
2015-03-30 13:30:15 +00:00

11 lines
266 B
Bash
Executable File

#!/bin/sh
#
# This script can be used to kill and restart the NTP daemon. Edit the
# /usr/local/bin/ntpd line to fit.
#
kill -INT `ps -ax | egrep "ntpd" | egrep -v "egrep" | sed 's/^\([ 0-9]*\) .*/\1'/`
sleep 10
/usr/local/bin/ntpd -g
/usr/local/bin/ntp-wait
exit 0