Added services management, first shot on ssh module
This commit is contained in:
35
modules/conf_ssh.sh
Normal file
35
modules/conf_ssh.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
# Configuration des client et serveur SSH
|
||||
|
||||
export VER_conf_ssh="0.0.1"
|
||||
|
||||
conf_ssh()
|
||||
{
|
||||
prnt I "Installation du serveur OpenSSH..."
|
||||
pkginst openssh-server
|
||||
|
||||
prnt I "Arrêt du service SSH..."
|
||||
svc_stop ssh
|
||||
|
||||
prnt I "Installation des fichiers de configuration de SSH..."
|
||||
for f in /etc/ssh/ssh{,d}_config; do
|
||||
dest="$f.work"
|
||||
backupdist $f
|
||||
installfile $(basename $f) $dest
|
||||
|
||||
# A finir
|
||||
|
||||
echo "# Generated on $(date --rfc-3339=seconds)" >> $dest &&
|
||||
mv -fv $dest $f
|
||||
done
|
||||
|
||||
prnt I "Démarrage du sevice ssh..."
|
||||
svc_start ssh
|
||||
}
|
||||
|
||||
precheck_conf_ssh()
|
||||
{
|
||||
# A finir
|
||||
}
|
||||
|
||||
export -f conf_ssh
|
||||
export -f precheck_conf_ssh
|
||||
Reference in New Issue
Block a user