diff options
author | NeodarZ <neodarz@neodarz.net> | 2017-07-06 23:20:04 +0200 |
---|---|---|
committer | NeodarZ <neodarz@neodarz.net> | 2017-07-06 23:20:04 +0200 |
commit | cded819c74e40c2f43c155e19a1f84340c2987a2 (patch) | |
tree | 1ffdbd22518ba5ba5b6c03201859473ed9b3d297 /server_create.sh | |
download | EphermalVPN-cded819c74e40c2f43c155e19a1f84340c2987a2.tar.xz EphermalVPN-cded819c74e40c2f43c155e19a1f84340c2987a2.zip |
Diffstat (limited to 'server_create.sh')
-rwxr-xr-x | server_create.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server_create.sh b/server_create.sh new file mode 100755 index 0000000..19ed7a1 --- /dev/null +++ b/server_create.sh @@ -0,0 +1,15 @@ +#!/bin/sh +ID=$(echo $(scw create --commercial-type=VC1S 5fc9990a-d274-49b8-afac-42af22b42a71) | cut -d'-' -f1) + +echo $ID +scw start $ID +scw attach $ID +while [[ $(scw ps -a | awk "/$ID.*(running).*/") == "" ]]; do + sleep 30 +done +echo "Runnig ! => $(scw ps -a | awk "/$ID.*(running).*/") " + +cat > ip <<EOF +$(scw inspect $ID | jq '.[0].public_ip.address' | cut -d'"' -f2) +EOF + |