Commit 40e87162 authored by Maarten de Waard's avatar Maarten de Waard 🤘🏻

really use hostname that is extracted for ping

parent 799a1fec
......@@ -105,10 +105,10 @@ setup_mapping()
notify_command="curl -X POST -H \"Authorization: Bearer $api_key\" -H \"Content-Type: application/json\" -d '{\"template\":\"ENCVMBOOTED\",\"HOSTNAME\":\"$(hostname)\",\"identifier\":\"instance-$instance_id\"}' $cosmos_url/api/v2/communication/sendmessage"
timeout=6
url=$(echo $url | sed -e 's/http[s]*:\/\/\([^:/]*\).*/\1/i')
hostname=$(echo $cosmos_url | sed -e 's/http[s]*:\/\/\([^:/]*\).*/\1/i')
# Wait until API is reachable (network interface = up)
wait_for_connection $cosmos_url $timeout
wait_for_connection $hostname $timeout
# Start cryptops API even if API is not reachable, because the only problem
# is the user would not get notified of startup.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment