Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rimusz committed Oct 26, 2015
1 parent dc04ff8 commit 0a1c5ac
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/CoreOS GUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
01E2853218A6C4E300BC630D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = "Rimantas Mocevicius";
TargetAttributes = {
01E2853918A6C4E300BC630D = {
Expand Down Expand Up @@ -380,7 +380,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx10.10;
SDKROOT = macosx;
};
name = Debug;
};
Expand Down Expand Up @@ -412,7 +412,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx10.10;
SDKROOT = macosx;
};
name = Release;
};
Expand All @@ -429,7 +429,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "net.linxos.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "CoreOS GUI";
PROVISIONING_PROFILE = "";
SDKROOT = macosx10.11;
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand All @@ -447,7 +447,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "net.linxos.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "CoreOS GUI";
PROVISIONING_PROFILE = "";
SDKROOT = macosx10.11;
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions src/CoreOS GUI/CoreOS GUI-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<string>1.0.1</string>
<key>CFBundleVersion</key>
<string>401</string>
<string>405</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
4 changes: 3 additions & 1 deletion src/files/etcdctl
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
# get VM's IP
vm_ip=$(< ~/coreos-osx/.env/ip_address)

ssh core@$vm_ip sudo /usr/bin/etcdctl $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20}
cmd=(ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet core@$vm_ip sudo /usr/bin/etcdctl "${@+$@}")

"${cmd[@]}"
4 changes: 3 additions & 1 deletion src/files/rkt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
# get VM's IP
vm_ip=$(< ~/coreos-osx/.env/ip_address)

ssh core@$vm_ip sudo /usr/bin/rkt $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12}
cmd=(ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet core@$vm_ip sudo /usr/bin/rkt "${@+$@}")

"${cmd[@]}"
29 changes: 29 additions & 0 deletions src/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,32 @@ chmod 600 ~/coreos-osx/.env/password
echo " "
}


function clean_up_after_vm {
sleep 3

# get App's Resources folder
res_folder=$(cat ~/coreos-osx/.env/resouces_path)

# Get password
my_password=$(cat ~/coreos-osx/.env/password | base64 --decode )

# Stop webserver
kill $(ps aux | grep "[p]ython -m SimpleHTTPServer 18000" | awk {'print $2'})

# Stop docker registry
kill $(ps aux | grep "[r]egistry config.yml" | awk {'print $2'})

# kill all coreos-osx/bin/xhyve instances
# ps aux | grep "[c]oreos-osx/bin/xhyve" | awk '{print $2}' | sudo -S xargs kill | echo -e "$my_password\n"
echo -e "$my_password\n" | sudo -S pkill -f [c]oreos-osx/bin/xhyve

echo -e "$my_password\n" | sudo -S pkill -f "${res_folder}"/bin/uuid2mac

# kill all other scripts
pkill -f [C]oreOS GUI.app/Contents/Resources/start_VM.command
pkill -f [C]oreOS GUI.app/Contents/Resources/bin/get_ip
pkill -f [C]oreOS GUI.app/Contents/Resources/bin/get_mac
pkill -f [C]oreOS GUI.app/Contents/Resources/bin/mac2ip

}
3 changes: 3 additions & 0 deletions src/halt.command
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ vm_ip=$(cat ~/coreos-osx/.env/ip_address)
# send halt to VM
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no core@$vm_ip sudo halt

# just in case run
clean_up_after_vm

0 comments on commit 0a1c5ac

Please sign in to comment.