1
0
Fork 0
mirror of https://github.com/zyberzero/certbot-rfc2136.git synced 2024-10-29 22:44:27 +01:00
certbot-rfc2136/certbot-clean.sh

12 lines
339 B
Bash
Raw Permalink Normal View History

2017-08-29 13:44:58 +02:00
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
NSUPDATE="nsupdate -k /path/to/private"
DNSSERVER="masterns.yourdomain.tld"
ZONE="yourzonename.tld"
TTL=300
printf "server %s\nzone %s.\nupdate delete _acme-challenge.%s. %d in TXT \"%s\"\nsend\n" "${DNSSERVER}" "${ZONE}" "${CERTBOT_DOMAIN}" "${TTL}" "${CERTBOT_VALIDATION}" | $NSUPDATE