Browse Source
Add --retry to curl to fix occasional "Bad Gateway" errors
pull/572/head
Tim Kimber
6 years ago
No known key found for this signature in database
GPG Key ID: 3E1804964E76BD18
2 changed files with
2 additions and
2 deletions
-
dns_scripts/dns_add_duckdns
-
dns_scripts/dns_del_duckdns
|
|
|
@ -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" |
|
|
|
|
|
|
|
@ -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" |
|
|
|
|