diff --git a/client/install_backuppc_windows_bash_on_linux.sh b/client/install_backuppc_windows_bash_on_linux.sh index 55f8d21..d1af899 100755 --- a/client/install_backuppc_windows_bash_on_linux.sh +++ b/client/install_backuppc_windows_bash_on_linux.sh @@ -63,6 +63,7 @@ function manageSshKeyForBackuppc() ## {{{ chown -R -- "${userLogin}:" "${userHomedir}" } ## }}} + function ensureSshdIsInstalled() ## {{{ { ### `command -v sshd` still return old value even after openssh-server was removed @@ -81,6 +82,12 @@ function ensureSshdIsInstalled() ## {{{ fi } ## }}} +function ensureSshdIsRunning() ## {{{ +{ + ### Ensure to completely restart sshd + service ssh --full-restart > /dev/null +} +## }}} # }}} @@ -111,6 +118,11 @@ if [ "$?" != "${SUCCESS}" ]; then printf '%b' "${REDB}L'installation du serveur ssh a échoué, installation annulée.${RESET}\\n" exit "${ERROR}" fi +ensureSshdIsRunning +if [ "$?" != "${SUCCESS}" ]; then + printf '%b' "${REDB}Le serveur ssh n'a pas correctement démarré, installation annulée.${RESET}\\n" + exit "${ERROR}" +fi # }}} exit "${SUCCESS}"