From 57cf93ac4161cfc23d5a648e130f645476527785 Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Thu, 25 Sep 2025 20:16:08 +0200 Subject: [PATCH] rework conf_ntp module --- modules/conf_ntp.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/conf_ntp.sh b/modules/conf_ntp.sh index 45caa48..5d1241a 100644 --- a/modules/conf_ntp.sh +++ b/modules/conf_ntp.sh @@ -11,7 +11,7 @@ # * NTPSERVERS: list of NTP servers # ------------------------------------------------------------------------------ -export VER_conf_ntp="0.1.6" +export VER_conf_ntp="0.2.0" export DEP_conf_ntp="" conf_ntp() @@ -21,16 +21,13 @@ conf_ntp() systemctl disable systemd-timesyncd || true fi + NTP_SERV=${NTP_SERV:-ntp} prnt I "Installing ntp daemon..." - pkginst ntp + pkginst $NTP_SERV prnt I "Stopping service ntp..." - if [[ -n $NTP_SERV ]]; then - svc_stop $NTP_SERV - else - svc_stop ntp - fi + svc_stop $NTP_SERV - if [[ -n $NTP_SERV ]]; then + if [[ $NTP_SERV == ntpsec ]]; then local conf_file="/etc/$NTP_SERV/ntp.conf" else local conf_file="/etc/ntp.conf"