Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rimusz committed Jul 27, 2015
1 parent f754fdf commit 4ce3565
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/CoreOS-xhyve UI/CoreOS-xhyve UI-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<key>CFBundleVersion</key>
<string>49</string>
<string>51</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
26 changes: 17 additions & 9 deletions src/destroy.command
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,23 @@ do
if [ $RESPONSE = y ]
then
VALID_MAIN=1
# Stop VM
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no core@$vm_ip sudo halt

# wait till VM is stopped
echo "Waiting for VM to shutdown..."
spin='-\|/'
i=0
until "${res_folder}"/check_vm_status.command | grep "VM is stopped" >/dev/null 2>&1; do i=$(( (i+1) %4 )); printf "\r${spin:$i:1}"; sleep .1; done
#

# check VM status
status=$(ps aux | grep "[c]oreos-xhyve-ui/bin/xhyve" | awk '{print $2}')
if [[ $status = *[!\ ]* ]]; then
echo " "
echo "CoreOS VM is running, it will be stopped !!!"

# Stop VM
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no core@$vm_ip sudo halt

# wait till VM is stopped
echo " "
echo "Waiting for VM to shutdown..."
spin='-\|/'
i=0
until "${res_folder}"/check_vm_status.command | grep "VM is stopped" >/dev/null 2>&1; do i=$(( (i+1) %4 )); printf "\r${spin:$i:1}"; sleep .1; done
fi

# delete extra.image
rm -f ~/coreos-xhyve-ui/extra.img
Expand Down

0 comments on commit 4ce3565

Please sign in to comment.