diff options
author | Bill <bill@billserver.senders.io> | 2023-07-05 10:52:53 -0400 |
---|---|---|
committer | Bill <bill@billserver.senders.io> | 2023-07-05 10:52:53 -0400 |
commit | 05ddb4ca9571d98e885b8a869ce9adf409ff21a0 (patch) | |
tree | fe1a947e4354d6d5be3f2bf32e65ed7a38d7fbf6 | |
parent | 0e0988682f887cd5e363ab7e23e9ed2a4c67184e (diff) |
Set env to bash and echo escaped chars
SH doesn't have source apparently and I missed a -e
-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") |