xref: /netbsd-src/external/bsd/ntp/dist/scripts/deprecated/ntp-restart (revision 8585484ef87f5a04d32332313cdb799625f4faf8)
1*8585484eSchristos#!/bin/sh
2*8585484eSchristos#
3*8585484eSchristos# This script can be used to kill and restart the NTP daemon. Edit the
4*8585484eSchristos# /usr/local/bin/ntpd line to fit.
5*8585484eSchristos#
6*8585484eSchristoskill -INT `ps -ax | egrep "ntpd" | egrep -v "egrep" | sed 's/^\([ 0-9]*\) .*/\1'/`
7*8585484eSchristossleep 10
8*8585484eSchristos/usr/local/bin/ntpd -g
9*8585484eSchristos/usr/local/bin/ntp-wait
10*8585484eSchristosexit 0
11