Fix typo and useless ";;"

This commit is contained in:
Jeremy Gardais 2018-04-25 11:40:23 +02:00
parent 0c8637b638
commit 764449747d
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 7 additions and 6 deletions

View File

@ -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"