Browse Source

Add --retry to curl to fix occasional "Bad Gateway" errors

pull/572/head
Tim Kimber 6 years ago
parent
commit
d24782088d
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      dns_scripts/dns_add_duckdns
  2. +1
    -1
      dns_scripts/dns_del_duckdns

+ 1
- 1
dns_scripts/dns_add_duckdns View File

@ -11,7 +11,7 @@ fi
domain="$1"
txtvalue="$2"
response=$(curl --silent "https://www.duckdns.org/update?domains=${domain}&token=${token}&txt=${txtvalue}")
response=$(curl --retry 5 --silent "https://www.duckdns.org/update?domains=${domain}&token=${token}&txt=${txtvalue}")
if [ "$response" != "OK" ]; then
echo "Failed to update TXT record for ${domain} at duckdns.org (is the TOKEN valid?)"
echo "Response: $response"


+ 1
- 1
dns_scripts/dns_del_duckdns View File

@ -4,7 +4,7 @@
token=${DUCKDNS_TOKEN:-}
domain="$1"
response=$(curl --silent "https://www.duckdns.org/update?domains=${domain}&token=${token}&txt=&clear=true")
response=$(curl --retry 5 --silent "https://www.duckdns.org/update?domains=${domain}&token=${token}&txt=&clear=true")
if [ "$response" != "OK" ]; then
echo "Failed to update TXT record for ${domain} at duckdns.org (is the TOKEN valid?)"
echo "$response"


Loading…
Cancel
Save