certbot-duckdns/certbot-auth

9 lines
274 B
Bash
Executable file

#!/usr/bin/env sh
set -x
baseurl='https://www.duckdns.org/update?domains=%s&token=%s&txt=%s'
result="$(printf "url=$baseurl\n" "$DUCKDNS_DOMAIN" "$DUCKDNS_TOKEN" "$CERTBOT_VALIDATION" | curl -K -)"
# give some time for the record to update
sleep 300
test "$result" = 'OK'