Unverified Commit 4a792d6f authored by David Beniamine's avatar David Beniamine
Browse files

Actually do something on reboot

parent 90f81bfd
......@@ -99,5 +99,14 @@ do
subactions="$(echo $LINE | sed -e 's/^upgrade//' -e 's/All//')"
nohup $DIR/upgrade_all.sh $subactions &
echo "Started 'upgrade_all.sh $subactions' in background on $(date)" | answer
elif [[ "$LINE" =~ "reboot" ]]
then
mac=$(echo $line | cut -d ' ' -f 2)
IPS=$(getip $mac | sed -e 's/ /,/g')
for $ip in $IPS
do
ssh $ip "reboot"
done
answer "Redémarrage demandé, attendez une à deux minutes avant d'essayer de vous connecter"
fi
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment