From 8286b26d96aeafbb258b19563ee4bc988627324c Mon Sep 17 00:00:00 2001 From: GARDAIS Jeremy Date: Fri, 20 May 2016 15:09:31 +0200 Subject: [PATCH] Correct the warning if sshd is unavailable. --- install_backuppc_linux_mac.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install_backuppc_linux_mac.sh b/install_backuppc_linux_mac.sh index b00669e..0086b1c 100755 --- a/install_backuppc_linux_mac.sh +++ b/install_backuppc_linux_mac.sh @@ -44,7 +44,7 @@ function ensurePingIsAllowed() 'Darwin') sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode off if [ $? != 0 ]; then - printf '\e[1;31m%-6s\e[m' "La désactivation du mode furtif a échoué"; return "$ERROR" + printf '\e[1;31m%-6s\e[m' "La désactivation du mode furtif a échoué"; return "$ERROR" fi ;; 'Linux') @@ -61,12 +61,12 @@ function ensureSshdIsRunning() if [ $? != 0 ]; then # enable 'Remote login' in 'system preferences' sudo launchctl enable system/com.openssh.sshd &> /dev/null - + sudo launchctl load /System/Library/LaunchDaemons/ssh.plist &> /dev/null fi sudo launchctl list | grep 'com.openssh.sshd' &> /dev/null if [ $? != 0 ]; then - printf '\e[1;31m%-6s\e[m' "L'activation du serveur ssh a échoué"; return "$ERROR" + printf '\e[1;31m%-6s\e[m' "L'activation du serveur ssh a échoué"; return "$ERROR" fi ;; 'Linux') @@ -99,7 +99,7 @@ function getMyHostKey() { if [ ! -f "${hostkey}" ]; then hostkey="/etc/ssh/ssh_host_rsa_key.pub" if [ ! -f "${hostkey}" ]; then - printf '\e[1;31m%-6s\e[m' "Impossible de trouver la clef ssh publique ce cette machine, installation annulée." + printf '\e[1;31m%-6s\e[m' "Impossible de trouver la clef ssh publique ce cette machine, SSH est-il bien installé?\n Installation annulée." return "$ERROR" fi fi