diff options
author | Bill <bill@billserver.senders.io> | 2023-07-05 10:58:40 -0400 |
---|---|---|
committer | Bill <bill@billserver.senders.io> | 2023-07-05 10:58:40 -0400 |
commit | d94d8dd6a465de08aa46cc5faad7382c692052c7 (patch) | |
tree | 9d98d389e697f368661c96e18909a4ab20f757b6 /update.sh | |
parent | 05ddb4ca9571d98e885b8a869ce9adf409ff21a0 (diff) |
Suppress cron status logmain
Prevent the progress from getting printed from curl.
Note: This seems like some platforms don't like it - we can try
redirecting whatever log it writes to to /dev/null
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -10,11 +10,11 @@ API_CONFIG=$2 source $API_CONFIG config_ip=$(dig +short $DOMAIN) -actual_ip=$(curl https://ipinfo.io/ip) +actual_ip=$(curl -s https://ipinfo.io/ip) if [ "$config_ip" != "$actual_ip" ]; then echo "Updating IP from $config_id to $actual_ip for $DOMAIN" - res=$(curl -X POST "https://porkbun.com/api/json/v3/dns/retrieve/$DOMAIN" \ + res=$(curl -s -X POST "https://porkbun.com/api/json/v3/dns/retrieve/$DOMAIN" \ -d "{ \"secretapikey\": \"${SECRETAPIKEY}\", \"apikey\": \"${APIKEY}\" }") status=$(echo "$res" | jq -r '.status') if [ "$status" != "SUCCESS" ]; then @@ -22,7 +22,7 @@ if [ "$config_ip" != "$actual_ip" ]; then exit 1 fi ID=$(echo "$res" | jq -r ".records[] | select(.type == \"A\") | select(.content == \"${config_ip}\") | .id") - res=$(curl -X POST "https://porkbun.com/api/json/v3/dns/edit/$DOMAIN/$ID" \ + res=$(curl -s -X POST "https://porkbun.com/api/json/v3/dns/edit/$DOMAIN/$ID" \ -d "{ \"secretapikey\": \"${SECRETAPIKEY}\", \"apikey\": \"${APIKEY}\", \"content\": \"${actual_ip}\", \"ttl\": \"600\", \"type\": \"A\", \"name\": \"\" }") status=$(echo "$res" | jq -r '.status') if [ "$status" == "SUCCESS" ]; then |