summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/scripts/deprecated/ntp-restart
blob: 0a1d58a5c56c88da76f3d5bbe090729fbc56b3cc (plain)
1
2
3
4
5
6
7
8
9
10
#!/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
OpenPOWER on IntegriCloud