rework conf_ntp module
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user