diff options
-rwxr-xr-x | update.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash set -e if [ $# -ne 2 ]; then echo "Usage: ./update.sh DOMAIN API_CONFIG" >&2 @@ -18,7 +18,7 @@ if [ "$config_ip" != "$actual_ip" ]; then -d "{ \"secretapikey\": \"${SECRETAPIKEY}\", \"apikey\": \"${APIKEY}\" }") status=$(echo "$res" | jq -r '.status') if [ "$status" != "SUCCESS" ]; then - echo "Failed to fetch domain ID:\n\t$res" >&2 + echo -e "Failed to fetch domain ID:\n\t$res" >&2 exit 1 fi ID=$(echo "$res" | jq -r ".records[] | select(.type == \"A\") | select(.content == \"${config_ip}\") | .id") |