2024-02-15 22:07:35 +01:00
|
|
|
. /link/shell/util/func.sh
|
|
|
|
|
|
|
|
while [ true ]
|
|
|
|
do
|
|
|
|
jopen /link/config/ntp.json
|
|
|
|
if [ `jget enable` == "true" ]; then
|
|
|
|
if ! procExists ntpd ;then
|
2024-02-15 22:07:50 +01:00
|
|
|
ntpd -p `jget server` -Nnq
|
2024-02-15 22:07:35 +01:00
|
|
|
fi
|
2024-02-15 22:07:50 +01:00
|
|
|
sleep $((`jget interval`*60))
|
2024-02-15 22:07:35 +01:00
|
|
|
else
|
|
|
|
pkill ntpd
|
|
|
|
fi
|
|
|
|
sleep 1
|
|
|
|
done
|