Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #266 from yoerayo/master
Browse files Browse the repository at this point in the history
Verify boot2docker VM is not running before starting it
  • Loading branch information
JeffDM committed Nov 2, 2015
2 parents 10d50a0 + 5da8009 commit d8a4ada
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions osx/mpkg/quickstart.app/Contents/Resources/Scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ else
echo "Machine $VM already exists in VirtualBox."
fi

echo "Starting machine $VM..."
$DOCKER_MACHINE start $VM
VM_STATUS=$($DOCKER_MACHINE status $VM)
if [ "$VM_STATUS" != "Running" ]; then
echo "Starting machine $VM..."
$DOCKER_MACHINE start $VM
fi

echo "Setting environment variables for machine $VM..."
clear
Expand Down
7 changes: 5 additions & 2 deletions windows/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ else
echo "Machine $VM already exists in VirtualBox."
fi

echo "Starting machine $VM..."
$DOCKER_MACHINE start $VM
VM_STATUS=$($DOCKER_MACHINE status $VM)
if [ "$VM_STATUS" != "Running" ]; then
echo "Starting machine $VM..."
$DOCKER_MACHINE start $VM
fi

echo "Setting environment variables for machine $VM..."
eval "$($DOCKER_MACHINE env --shell=bash $VM)"
Expand Down

0 comments on commit d8a4ada

Please sign in to comment.