Browse Source

Merge pull request #513 from 532910/nsupdate_options

Nsupdate - add support for custom nameserver and zone
pull/518/head
Tim Kimber 6 years ago
committed by GitHub
parent
commit
69b89eb1f0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 8 deletions
  1. +6
    -4
      dns_scripts/dns_add_nsupdate
  2. +6
    -4
      dns_scripts/dns_del_nsupdate

+ 6
- 4
dns_scripts/dns_add_nsupdate View File

@ -21,12 +21,14 @@ if [ -n "${DNS_NSUPDATE_KEYFILE}" ]; then
options="-k ${DNS_NSUPDATE_KEYFILE}"
fi
# Note that blank line is a "send" command to nsupdate
if [ -n "${DNS_SERVER}" ]; then
cmd+="server ${DNS_SERVER}\n"
fi
nsupdate ${options} -v <<EOF
update add _acme-challenge.${fulldomain}. 300 in TXT "${token}"
cmd+="update add ${DNS_ZONE:-"_acme-challenge.${fulldomain}."} 300 in TXT \"${token}\"\n"
cmd+="\n" # blank line is a "send" command to nsupdate
EOF
printf "$cmd" | nsupdate ${options} -v
sts=$?


+ 6
- 4
dns_scripts/dns_del_nsupdate View File

@ -21,12 +21,14 @@ if [ -n "${DNS_NSUPDATE_KEYFILE}" ]; then
options="-k ${DNS_NSUPDATE_KEYFILE}"
fi
# Note that blank line is a "send" command to nsupdate
if [ -n "${DNS_SERVER}" ]; then
cmd+="server ${DNS_SERVER}\n"
fi
nsupdate ${options} -v <<EOF
update delete "_acme-challenge.${fulldomain}." 300 in TXT "${token}"
cmd+="update delete ${DNS_ZONE:-"_acme-challenge.${fulldomain}."} 300 in TXT \"${token}\"\n"
cmd+="\n" # blank line is a "send" command to nsupdate
EOF
printf "$cmd" | nsupdate ${options} -v
sts=$?


Loading…
Cancel
Save