Commit 799a1fec authored by Maarten de Waard's avatar Maarten de Waard 🤘🏻

extract hostname from URL for using ping

parent dafd703d
......@@ -105,7 +105,8 @@ 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')
# Wait until API is reachable (network interface = up)
wait_for_connection $cosmos_url $timeout
......
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