Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash -epu
- VMID=$(cat vbox/state.json | jq -r .current_vm_cid)
- if [[ -z "$VMID" ]]; then
- echo "unknown VM ID" >&2
- exit 1
- fi
- case $1 in
- start)
- echo -n "Starting Bosh Lite VM... "
- vboxmanage startvm "$VMID" --type=headless
- echo "Done!"
- ;;
- stop)
- echo -n "Stopping Bosh Lite VM... "
- vboxmanage controlvm "$VMID" savestate
- echo "Done!"
- ;;
- *)
- echo "usage: $0 <start|stop>" >&2
- exit 1
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement