Updated NTP to start using dmon (#338)

Replace timesync with ntpd but retain dmon so that NTP status can be
read from the system logs.
This commit is contained in:
Leo 2022-10-13 01:33:51 -06:00 committed by GitHub
parent 436f5e30d6
commit b35653f86f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,8 +13,8 @@ case "$1" in
echo "#####$(basename "$0")#####"
if [ ! -z "$NTP_SERVER" ] ; then
# Slight delay required so that we can kill timesync from interfering
(sleep 30 && kill -9 $(pgrep -f timesync) ; /opt/wz_mini/tmp/.bin/ntpd -p "$NTP_SERVER") &
# Replace timesync call with our own ntpd using a custom NTP server
sed -i "s/\/system\/bin\/timesync/\/opt\/wz_mini\/tmp\/.bin\/ntpd -ndp '$NTP_SERVER'/" /opt/wz_mini/tmp/.storage/app_init.sh
fi
;;