summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfunctions.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/functions.sh b/functions.sh
index 5f7c0db..01b558c 100755
--- a/functions.sh
+++ b/functions.sh
@@ -23,7 +23,16 @@ clean_up() {
# Create jumphost VM
create_jump() {
./create_vm.sh "$VM_NAME"
- sleep 30
+ jumpbox_ip=$(get_vm_ip)
+ i=0
+ while [ -z $jumpbox_ip ]; do
+ sleep $((++i))
+ jumpbox_ip=$(get_vm_ip)
+ done
+ i=0
+ until nc -w5 -z $jumpbox_ip 22; do
+ sleep $((++i))
+ done
}
# Get jumphost VM IP