rework conf_ntp module

This commit is contained in:
2025-09-25 20:16:08 +02:00
parent e32501537d
commit 57cf93ac41

View File

@@ -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
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"