summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xupdate.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/update.sh b/update.sh
index 9fba7be..663cebc 100755
--- a/update.sh
+++ b/update.sh
@@ -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")