github.com/chasestarr/deis@v1.13.5-0.20170519182049-1d9e59fbdbfc/tests/bin/halt-all-vagrants.sh (about)

     1  #!/bin/sh
     2  #
     3  # Tells vagrant to halt all running VMs with "deis" in the name.
     4  
     5  RUNNING_VMS=$(vagrant global-status | grep deis | grep running | awk '{ print $5 }')
     6  for dir in $RUNNING_VMS; do
     7      cd $dir && vagrant halt
     8  done