aboutsummaryrefslogtreecommitdiff
path: root/scripts/deprecated/ntp-restart
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/deprecated/ntp-restart')
-rwxr-xr-xscripts/deprecated/ntp-restart10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/deprecated/ntp-restart b/scripts/deprecated/ntp-restart
new file mode 100755
index 000000000000..0a1d58a5c56c
--- /dev/null
+++ b/scripts/deprecated/ntp-restart
@@ -0,0 +1,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