From b35653f86f2a373066815a7f48dafb7e84f99c4a Mon Sep 17 00:00:00 2001 From: Leo Date: Thu, 13 Oct 2022 01:33:51 -0600 Subject: [PATCH] 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. --- SD_ROOT/wz_mini/etc/init.d/S18ntp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SD_ROOT/wz_mini/etc/init.d/S18ntp b/SD_ROOT/wz_mini/etc/init.d/S18ntp index 94b8726..5128690 100644 --- a/SD_ROOT/wz_mini/etc/init.d/S18ntp +++ b/SD_ROOT/wz_mini/etc/init.d/S18ntp @@ -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 ;;