report READY=YES

pull/43/head
Jaime Melis 9 years ago
parent b7d142272d
commit db431f7acb

@ -0,0 +1,35 @@
#!/bin/bash
if [ "$REPORT_READY" != "YES" ]; then
exit 0
fi
if which onegate >/dev/null 2>&1; then
onegate vm update --data ONEGATE_READY=YES
if [ "$?" = "0" ]; then
exit 0
fi
fi
if which curl >/dev/null 2>&1; then
curl -X "PUT" "${ONEGATE_ENDPOINT}/vm" \
--header "X-ONEGATE-TOKEN: $TOKENTXT" \
--header "X-ONEGATE-VMID: $VMID" \
-d "CURL_READY=YES"
if [ "$?" = "0" ]; then
exit 0
fi
fi
if which wget >/dev/null 2>&1; then
wget --method=PUT "${ONEGATE_ENDPOINT}/vm" \
--body-data="WGET_READY=YES" \
--header "X-ONEGATE-TOKEN: $TOKENTXT" \
--header "X-ONEGATE-VMID: $VMID"
if [ "$?" = "0" ]; then
exit 0
fi
fi
Loading…
Cancel
Save