Created
April 14, 2016 16:03
-
-
Save seagoj/089b5e4d711b130cbdd3d63ac511148b to your computer and use it in GitHub Desktop.
Resume/Suspend Vagrant VM script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/bash | |
(\ | |
# attempts to resume VM | |
(vagrant resume; vagrant ssh) || \ | |
# rebuilds vm | |
(vagrant destroy -f && vagrant up; vagrant ssh)\ | |
# suspends when ssh session closes | |
) && vagrant suspend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment