Skip to content
Snippets Groups Projects
Verified Commit 4a792d6f authored by David Beniamine's avatar David Beniamine
Browse files

Actually do something on reboot

parent 90f81bfd
Branches
No related tags found
No related merge requests found
...@@ -99,5 +99,14 @@ do ...@@ -99,5 +99,14 @@ do
subactions="$(echo $LINE | sed -e 's/^upgrade//' -e 's/All//')" subactions="$(echo $LINE | sed -e 's/^upgrade//' -e 's/All//')"
nohup $DIR/upgrade_all.sh $subactions & nohup $DIR/upgrade_all.sh $subactions &
echo "Started 'upgrade_all.sh $subactions' in background on $(date)" | answer 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 fi
done done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment