Modification for use with CNAMEs

Brian Candler
2017-07-29 08:39:29 +01:00
parent b1c1f91c7b
commit 82f9be1052

@@ -45,4 +45,18 @@ case "$1" in
esac
exit 0
```
```
If you are using CNAMEs to put all your dynamic updates into a single zone, then you can modify it:
```
ZONE="acme.mydomain.com"
...
"deploy_challenge")
printf "server %s\nzone %s.\nupdate add _acme-challenge.%s.%s. %d in TXT \"%s\"\nsend\n" "${DNSSERVER}" "${ZONE}" "${2}" "${ZONE}" "${TTL}" "${4}" | $NSUPDATE
;;
"clean_challenge")
printf "server %s\nzone %s.\nupdate delete _acme-challenge.%s.%s. %d in TXT \"%s\"\nsend\n" "${DNSSERVER}" "${ZONE}" "${2}" "${ZONE}" "${TTL}" "${4}" | $NSUPDATE
```
You will need to add static CNAMEs for `_acme-challenge.<certname>` pointing at `_acme-challenge.<certname>.acme.mydomain.com` for each certificate you want to issue.