/contrib/ntp/scripts/ntp-restart
https://bitbucket.org/freebsd/freebsd-head/ · Shell · 10 lines · 5 code · 0 blank · 5 comment · 0 complexity · 9defffae77954b501a1db8dacde49cce MD5 · raw 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