diff --git a/certbot-auth b/certbot-auth index 2e8fd52..7c7db8c 100755 --- a/certbot-auth +++ b/certbot-auth @@ -8,7 +8,8 @@ result="$(printf "url=$baseurl\n" "$DUCKDNS_DOMAIN" "$DUCKDNS_TOKEN" "$CERTBOT_V # give some time for the record to update echo "waiting for txt record" >&2 for i in $(seq 0 60); do - val="$(dig -t txt redxef2.duckdns.org | grep -A 1 ';; ANSWER SECTION:' | tail -n1 | sed -n 's/.*"\([^"]*\)".*/\1/p')" + val="$(nslookup -type=TXT "$DUCKDNS_DOMAIN.duckdns.org" | grep "$DUCKDNS_DOMAIN.duckdns.org.*text.*=.*" | sed -n 's/.*"\([^"]*\)".*/\1/p')" + echo "$val" >&2 test "$val" = "$CERTBOT_VALIDATION" && break sleep 10 done diff --git a/certbot-duckdns b/certbot-duckdns index 11ed797..9526099 100755 --- a/certbot-duckdns +++ b/certbot-duckdns @@ -1,7 +1,5 @@ #!/usr/bin/env sh -set -x - certbot certonly --manual --preferred-challenges dns-01 --keep \ --email="$LE_EMAIL" --domains="$DUCKDNS_DOMAIN.duckdns.org,*.$DUCKDNS_DOMAIN.duckdns.org" \ --agree-tos --no-eff-email --manual-public-ip-logging-ok \