gh-125: Reorder sending ready report (#135)

Put onegate to the last resort to prevent potential failures with
missing ruby or hanging due to low entropy.
pull/137/head
Jan Orel 6 years ago committed by Vlastimil Holer
parent ef254cb0af
commit 4da1b90ae4

@ -13,14 +13,6 @@ fi
###
if which onegate >/dev/null 2>&1; then
onegate vm update --data "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" \
@ -42,3 +34,11 @@ if which wget >/dev/null 2>&1; then
exit 0
fi
fi
if which onegate >/dev/null 2>&1; then
onegate vm update --data "READY=YES"
if [ "$?" = "0" ]; then
exit 0
fi
fi

Loading…
Cancel
Save