You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
248 B

#!/bin/sh
SLEEPTIME=10
while true
do
STATUS="$(/usr/sbin/ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')"
if [[ -n "$STATUS" && "$STATUS" -lt "16" ]]
then
ACTION="stratum" /sbin/hotplug-call ntp
SLEEPTIME=660
fi
sleep $SLEEPTIME
done