You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
589 B

  1. #!/bin/sh
  2. VAGRANT=`which vagrant`
  3. ### User vagrant global-status to get the global ID
  4. GLOBAL_ID='e2d06a8'
  5. GLOBAL_DIR='/opt/vhosts/tools-deployment'
  6. CWD=`pwd`
  7. pushd $GLOBAL_DIR
  8. if [[ $1 == "up" ]]
  9. then
  10. $VAGRANT up $GLOBAL_ID
  11. ntfy -l INFO -t 'VAGRANT' send 'VM has finished booting'
  12. elif [[ $1 == "halt" ]]
  13. then
  14. $VAGRANT halt $GLOBAL_ID
  15. ntfy -l INFO -t 'VAGRANT' send 'VM has halted'
  16. elif [[ $1 == "sup" ]]
  17. then
  18. $VAGRANT up $GLOBAL_ID
  19. ntfy -l INFO -t 'VAGRANT' send 'VM has started, ssh-ing into it'
  20. echo 'Shelling into machine...'
  21. $VAGRANT ssh
  22. else
  23. $VAGRANT "$@"
  24. fi
  25. popd