mirror of
https://github.com/letic/Shell-Scripts.git
synced 2024-09-28 05:56:04 +00:00
Update cosmos_config.sh
This commit is contained in:
parent
3003ce4c82
commit
2c08c93422
@ -33,6 +33,9 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check the jq dependency is available
|
||||||
|
type foo >/dev/null 2>&1 || { printf >&2 "\nThe jq dependency is missing. Please first run 'brew install jq'\n"; exit 1; }
|
||||||
|
|
||||||
instances=($(curl --silent --cert $cert "$api/instances" | jq --raw-output ".[] | .id,.private_ip_address"))
|
instances=($(curl --silent --cert $cert "$api/instances" | jq --raw-output ".[] | .id,.private_ip_address"))
|
||||||
num_of_instances=$((${#instances[@]} / 2)) # we know the data arrives in a pair: <id>,<ip>
|
num_of_instances=$((${#instances[@]} / 2)) # we know the data arrives in a pair: <id>,<ip>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user