blob: eacf4c55d399c7970e9057d8e62c30c41f38788b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/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
|