linkpi_firmware_history/rootfs/link/shell/ntp.sh

15 lines
274 B
Bash

. /link/shell/util/func.sh
while [ true ]
do
jopen /link/config/ntp.json
if [ `jget enable` == "true" ]; then
if ! procExists ntpd ;then
ntpd -p `jget server` -N
fi
else
pkill ntpd
fi
sleep 1
done