From 739c2f6dd9c358b67d514c7548b0ffac2d7b0b36 Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Wed, 4 May 2016 16:14:19 +0200 Subject: [PATCH] =?UTF-8?q?Bug=201326=20-=20[BackupPC]=20le=20script=20d'i?= =?UTF-8?q?nstallation=20pour=20OSX=20n'active=20pas=20SSHD=20:=20correcti?= =?UTF-8?q?on=20du=20bug=20en=20ajoutant=20une=20commande=20qui=20active?= =?UTF-8?q?=20le=20service=20ssh.=20J'ai=20test=C3=A9=20le=20scrip=20et=20?= =?UTF-8?q?il=20fonctionne=20sur=20simpa-macbook2=20(osx=2010.10).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install_backuppc_linux_mac.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install_backuppc_linux_mac.sh b/install_backuppc_linux_mac.sh index 545fd24..33f663c 100755 --- a/install_backuppc_linux_mac.sh +++ b/install_backuppc_linux_mac.sh @@ -44,7 +44,13 @@ function ensureSshdIsRunning() sudo launchctl list | grep 'com.openssh.sshd' &> /dev/null if [ $? != 0 ]; then # enable 'Remote login' in 'system preferences' - launchctl load /System/Library/LaunchDaemons/ssh.plist &> /dev/null + 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" fi ;; 'Linux') @@ -232,6 +238,9 @@ fi #### INSTALLATION DE OPENSSH-SERVER #### ensureSshdIsRunning +if [ "$?" != "$SUCCESS" ]; then + printf '\e[1;31m%-6s\e[m' "L'installation du serveur ssh a échoué, installation annulée."; exit +fi hostkey=$(getMyHostKey) #printf "hostkey=$hostkey" if [ "$?" != "$SUCCESS" ]; then