diff --git a/install_backuppc_mac.sh b/install_backuppc_mac.sh index 14ba659..65b470b 100755 --- a/install_backuppc_mac.sh +++ b/install_backuppc_mac.sh @@ -84,7 +84,7 @@ function IpAddress() { printf '\e[1;31m%-6s\e[m\n' "ERREUR : Impossible de récupérer l'adresse IP de cette machine (${strMyIpAddress})." return 1 fi - echo "{$strMyIpAddress}" + echo "${strMyIpAddress}" } ## }}} @@ -94,7 +94,7 @@ function MyFqdn() { local strMyIpAddress local strMyFqdn strMyIpAddress=$( IpAddress ) # eg '129.20.27.49' - strMyFqdn=$(host "$strMyIpAddress" | awk '{print $5}') + strMyFqdn=$(host "${strMyIpAddress}" | awk '{print $5}') echo "${strMyFqdn%?}" # remove the trailing '.' } ## }}} @@ -182,9 +182,9 @@ function AllowBackuppcSudo() { return "$ERROR" fi -# Ensure to create the sudoers directory + # Ensure to create the sudoers directory sudo mkdir -p -- "${sudoersDir}" -[[ "${DEBUG}" == "0" ]] && printf '\e[1;33m%-6s\e[m\n' "DEBUG : Création du dossier pour les sudoers (${sudoersDir})." + [[ "${DEBUG}" == "0" ]] && printf '\e[1;33m%-6s\e[m\n' "DEBUG : Création du dossier pour les sudoers (${sudoersDir})." # Allow backuppc user to use rsync with sudo sudo sh -c "echo '${userLogin} ALL=(ALL:ALL) NOEXEC:NOPASSWD: /usr/bin/rsync' > ${sudoersDir}/backuppc_noexec" @@ -240,7 +240,7 @@ fi #### DOSSIER À SAUVEGARDER INTROUVABLE, ANNULATION #### if [ ! -d "${dir1}" ]; then -[[ "${DEBUG}" == "0" ]] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Partie - Dossier introuvable" + [[ "${DEBUG}" == "0" ]] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Partie - Dossier introuvable" printf '\e[1;31m%-6s\e[m\n' "ERREUR : Dossier ${dir1} introuvable, installation annulée." exit fi