bug 1323 : après avoir testé avec succès que la commande de désactivation du mode furtif fonctionne bien sur simpa-macbook2 (osx 10.10), ajout de cette commande au script d'install de sauvegarde backuppc

This commit is contained in:
Guillaume Raffy 2016-05-11 12:26:16 +02:00
parent b7733bae9d
commit 01253a6110
1 changed files with 19 additions and 0 deletions

View File

@ -37,6 +37,22 @@ function allowUserToConnectToThisMachineUsingSsh()
esac esac
} }
function ensurePingIsAllowed()
{
case $(uname) in
'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"
fi
;;
'Linux')
;;
esac
}
function ensureSshdIsRunning() function ensureSshdIsRunning()
{ {
case $(uname) in case $(uname) in
@ -236,6 +252,9 @@ if [[ "${input_dir2}" != "" ]]; then
else directories="'${dir1}'" else directories="'${dir1}'"
fi fi
# backuppc server a besoin de ping-er les clients
ensurePingIsAllowed
#### INSTALLATION DE OPENSSH-SERVER #### #### INSTALLATION DE OPENSSH-SERVER ####
ensureSshdIsRunning ensureSshdIsRunning
if [ "$?" != "$SUCCESS" ]; then if [ "$?" != "$SUCCESS" ]; then