managing systemd-timesyncd in conf_ntp, make use of die instead of exit

This commit is contained in:
fatalerrors
2021-06-18 11:34:22 +02:00
parent 076a12b770
commit 8bb69f931d
6 changed files with 19 additions and 12 deletions

View File

@@ -1,9 +1,16 @@
# NTP
export VER_conf_ntp="0.0.2"
export VER_conf_ntp="0.0.3"
conf_ntp()
{
if [[ $(pidof systemd) ]]; then
prnt I "Désactivation de Systemd-timesyncd..."
systemctl disable systemd-timesyncd || true
fi
prnt I "Installation du démon ntp..."
pkginst ntp
prnt I "Arrêt du service ntp..."
svc_stop ntp
@@ -28,7 +35,7 @@ precheck_conf_ntp()
{
if [[ ! $NTPSERVERS ]]; then
prnt E "Pas de serveur NTP configuré !"
exit 1
die 5
fi
}