Added services management, first shot on ssh module

This commit is contained in:
fatalerrors
2021-06-09 17:49:54 +02:00
parent 71540b49e6
commit e970f24a5c
4 changed files with 86 additions and 2 deletions

View File

@@ -1,9 +1,12 @@
# NTP
export VER_conf_ntp="0.0.1"
export VER_conf_ntp="0.0.2"
conf_ntp()
{
prnt I "Arrêt du service ntp..."
svc_stop ntp
prnt I "Installation du fichier de configuration de NTP."
dest="/etc/ntp.conf.work"
backupdist /etc/ntp.conf
@@ -15,6 +18,9 @@ conf_ntp()
sed -i -e "s/@SERVERLIST@/$line/" $dest &&
echo "# Generated on $(date --rfc-3339=seconds)" >> $dest &&
mv -fv $dest /etc/ntp.conf
prnt I "Démarrage du service ntp..."
svc_start ntp
}
# NTP