Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- WALL=wall
- # this script is triggered in case the power fails
- echo "suspending all VMs on ESXI..." | ${WALL}
- # configured ssh-automatic-access with keys
- ssh root@esx-ts1 "nohup /vmfs/volumes/Cavern-Datastore/Scripts/shutdown_esxi.sh > /dev/null 2>&1 &"
- ssh root@esx-lap1 "nohup /vmfs/volumes/Cavern-Datastore/Scripts/shutdown_esxi.sh > /dev/null 2>&1 &"
- echo "finished shutting ESXI down..." | ${WALL}
- # exit code 99 - apccontrol stops after this script, so no shutdown of this host. this is for testing purposes
- # exit code 0 - apccontrol continues with shutdown after this script
- exit 99
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement