Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #!/bin/sh
  2. WALL=wall
  3.  
  4. # this script is triggered in case the power fails
  5.  
  6. echo "suspending all VMs on ESXI..." | ${WALL}
  7.  
  8. # configured ssh-automatic-access with keys
  9. ssh root@esx-ts1 "nohup /vmfs/volumes/Cavern-Datastore/Scripts/shutdown_esxi.sh > /dev/null 2>&1 &"
  10. ssh root@esx-lap1 "nohup /vmfs/volumes/Cavern-Datastore/Scripts/shutdown_esxi.sh > /dev/null 2>&1 &"
  11.  
  12. echo "finished shutting ESXI down..." | ${WALL}
  13.  
  14. # exit code 99 - apccontrol stops after this script, so no shutdown of this host. this is for testing purposes
  15. # exit code 0 - apccontrol continues with shutdown after this script
  16. exit 99
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement