From 6224dc8eba9f9d2d4b9cb31a6e4581073eedf079 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 28 Jun 2024 16:41:59 -0400 Subject: [PATCH] some minor fixes to new_droplet --- automation/new_droplet.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/automation/new_droplet.sh b/automation/new_droplet.sh index 3341e0a..4ba93a7 100755 --- a/automation/new_droplet.sh +++ b/automation/new_droplet.sh @@ -28,18 +28,18 @@ droplet_id=$(doctl compute droplet create \ --region tor1 \ --enable-monitoring \ --ssh-keys "$SSH_KEYS" \ - "$1" --output json | jq -r '.droplet.id') + "$1" --output json | jq -r '.[0].id') # Wait for the droplet to be active echo "Waiting for droplet to be active..." while true; do - status=$(doctl compute droplet get "$droplet_id" --output json | jq -r '.droplet.status') + status=$(doctl compute droplet get "$droplet_id" --output json | jq -r '.[0].status') if [ "$status" = "active" ]; then break fi - sleep 5 + sleep 2 done # Get the public and private IP addresses, guaranteed to be at index zero as we limit names