From 764449747dc8d7abcd9ca8410614e60056f21ffe Mon Sep 17 00:00:00 2001 From: GARDAIS Jeremy Date: Wed, 25 Apr 2018 11:40:23 +0200 Subject: [PATCH] Fix typo and useless ";;" --- install_backuppc_mac.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install_backuppc_mac.sh b/install_backuppc_mac.sh index 8870a7a..0b0fd9f 100755 --- a/install_backuppc_mac.sh +++ b/install_backuppc_mac.sh @@ -20,14 +20,14 @@ function allowUserToConnectToThisMachineUsingSsh() #dscl . append '/Groups/com.apple.access_ssh' user "${userLogin}" #dscl . append /Groups/com.apple.access_ssh groupmembers $(dscl . read "/Users/${userLogin}" GeneratedUID | cut -d " " -f 2) - printf '\e[1;31m%-6s\e[m' "DEBUG : Autoriser les accès SSH pour ${userLogin}." + printf '\e[1;31m%-6s\e[m\n' "DEBUG : Autoriser les accès SSH pour ${userLogin}." } function ensurePingIsAllowed() { #sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode off - printf '\e[1;31m%-6s\e[m' "DEBUG : Désactivation du mode furtif (ping)." + printf '\e[1;31m%-6s\e[m\n' "DEBUG : Désactivation du mode furtif (ping)." if [ $? != 0 ]; then printf '\e[1;31m%-6s\e[m' "La désactivation du mode furtif a échoué"; return "$ERROR" fi @@ -36,7 +36,7 @@ function ensurePingIsAllowed() function ensureSshdIsRunning() { #sudo launchctl list | grep 'com.openssh.sshd' &> /dev/null - printf '\e[1;31m%-6s\e[m' "DEBUG : Vérification si sshd est déjà en cours." + printf '\e[1;31m%-6s\e[m\n' "DEBUG : Vérification si sshd est déjà en cours." if [ $? != 0 ]; then # enable 'Remote login' in 'system preferences' sudo launchctl enable system/com.openssh.sshd &> /dev/null @@ -44,7 +44,7 @@ function ensureSshdIsRunning() sudo launchctl load /System/Library/LaunchDaemons/ssh.plist &> /dev/null fi #sudo launchctl list | grep 'com.openssh.sshd' &> /dev/null - printf '\e[1;31m%-6s\e[m' "DEBUG : Activation du serveur ssh." + printf '\e[1;31m%-6s\e[m\n' "DEBUG : Activation du serveur ssh." if [ $? != 0 ]; then printf '\e[1;31m%-6s\e[m' "L'activation du serveur ssh a échoué"; return "$ERROR" fi @@ -65,7 +65,7 @@ function getMyHostKey() { function IpAddress() { local strMyIpAddress='' local strOsName=$( uname ) - strMyIpAddress=$(dig +short myip.opendns.com @resolver1.opendns.com) ;; + strMyIpAddress=$(dig +short myip.opendns.com @resolver1.opendns.com) if [ "$strMyIpAddress" == '' ]; then error "failed to retrieve the ip address of this machine" return 1 @@ -227,6 +227,7 @@ chown -R "${usr}" "${homeuser}"/.ssh/ #### END #### printf "\n" printf '\e[1;34m%-6s\e[m' "Configuration du poste terminée." -printf '\e[1;34m%-6s\e[m' "Envoyez bien votre fichier de configuration (${dir1}/${filepl}) à Jérémy GARDAIS." +printf '\e[1;34m%-6s\e[m' "Envoyez bien votre fichier de configuration (${dir1}/${filepl}) à Jérémy GARDAIS (jeremy.gardai@univ-rennes1.fr)." +printf "\n" printf '\e[1;34m%-6s\e[m' "Vous pourrez affiner la configuration de votre sauvegarde depuis https://backuppc.ipr.univ-rennes1.fr" printf "\n"