summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill <bill@billserver.senders.io>2023-07-05 10:52:53 -0400
committerBill <bill@billserver.senders.io>2023-07-05 10:52:53 -0400
commit05ddb4ca9571d98e885b8a869ce9adf409ff21a0 (patch)
treefe1a947e4354d6d5be3f2bf32e65ed7a38d7fbf6
parent0e0988682f887cd5e363ab7e23e9ed2a4c67184e (diff)
Set env to bash and echo escaped chars
SH doesn't have source apparently and I missed a -e
-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")