Fail on curl failure... not success!

This commit is contained in:
fnux 2020-01-23 15:33:26 +01:00
parent 1af860e06f
commit b2f473c9f5

View file

@ -76,7 +76,7 @@ deploy_ssh_authorized_keys () {
fi fi
curl_output=$(mktemp) curl_output=$(mktemp)
if curl "$UNCLOUD_METADATA_SERVER/fnux" --output "$curl_output"; then if ! curl "$UNCLOUD_METADATA_SERVER/fnux" --output "$curl_output"; then
echo "Something went wrong fetching the authorized_keys file from the \ echo "Something went wrong fetching the authorized_keys file from the \
metedata server." >&2 metedata server." >&2
echo "CURL Output: $(cat "$curl_output")" echo "CURL Output: $(cat "$curl_output")"