rework conf_ntp module
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
# * NTPSERVERS: list of NTP servers
|
# * NTPSERVERS: list of NTP servers
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
export VER_conf_ntp="0.1.6"
|
export VER_conf_ntp="0.2.0"
|
||||||
export DEP_conf_ntp=""
|
export DEP_conf_ntp=""
|
||||||
|
|
||||||
conf_ntp()
|
conf_ntp()
|
||||||
@@ -21,16 +21,13 @@ conf_ntp()
|
|||||||
systemctl disable systemd-timesyncd || true
|
systemctl disable systemd-timesyncd || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
NTP_SERV=${NTP_SERV:-ntp}
|
||||||
prnt I "Installing ntp daemon..."
|
prnt I "Installing ntp daemon..."
|
||||||
pkginst ntp
|
pkginst $NTP_SERV
|
||||||
prnt I "Stopping service ntp..."
|
prnt I "Stopping service ntp..."
|
||||||
if [[ -n $NTP_SERV ]]; then
|
svc_stop $NTP_SERV
|
||||||
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"
|
local conf_file="/etc/$NTP_SERV/ntp.conf"
|
||||||
else
|
else
|
||||||
local conf_file="/etc/ntp.conf"
|
local conf_file="/etc/ntp.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user