changes to shutdown behavior

This commit is contained in:
Aaron Riedel 2022-07-04 10:24:06 +02:00
parent 9e748edb78
commit d47052f216
Signed by: aaron
GPG key ID: 643004654D40D577

View file

@ -91,10 +91,9 @@ then
then then
#Server stoppen #Server stoppen
echo "Stoppe server..." echo "Stoppe server..."
ssh -f -i /root/.ssh/shcloud -l root -o "StrictHostKeyChecking=no" shcloud.eu 'su -c "cd /gameserver/'$GAME' && /gameserver/'$GAME'/'$GAME' stop" gameserver' ssh shcloud.eu 'su -c "cd /gameserver/'$GAME' && /gameserver/'$GAME'/'$GAME' stop" gameserver'
sleep 15 echo "Fahre Server herunter..."
echo "Fahre server runter..." ssh shcloud.eu 'shutdown now'
ssh -f -i /root/.ssh/shcloud -l root -o "StrictHostKeyChecking=no" shcloud.eu 'shutdown now'
sleep 5 sleep 5
#Volume entfernen #Volume entfernen
volume_detach=$(curl -X POST -H "Authorization: Bearer $API_TOKEN" 'https://api.hetzner.cloud/v1/volumes/'$VOLUME_ID'/actions/detach' -s) volume_detach=$(curl -X POST -H "Authorization: Bearer $API_TOKEN" 'https://api.hetzner.cloud/v1/volumes/'$VOLUME_ID'/actions/detach' -s)