Switched commands.

This commit is contained in:
redxef 2020-10-29 23:58:52 +01:00
parent 31998074fa
commit 7e8ad2ff27
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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 \