Browse Source

Nsupdate one-liner (#393)

Pipe the commands to nsupdate
pull/428/head
Robbie Mckennie 6 years ago
committed by Emii Khaos
parent
commit
4e7e13ca6c
2 changed files with 2 additions and 14 deletions
  1. +1
    -7
      dns_scripts/dns_add_nsupdate
  2. +1
    -7
      dns_scripts/dns_del_nsupdate

+ 1
- 7
dns_scripts/dns_add_nsupdate View File

@ -7,10 +7,4 @@ dnskeyfile="path/to/bla.key"
fulldomain="$1"
token="$2"
updatefile=$(mktemp)
printf "update add _acme-challenge.%s. 300 in TXT \"%s\"\n\n" "${fulldomain}" "${token}" > "${updatefile}"
nsupdate -k "${dnskeyfile}" -v "${updatefile}"
rm -f "${updatefile}"
printf "update add _acme-challenge.%s. 300 in TXT \"%s\"\n\n" "${fulldomain}" "${token}" | nsupdate -k "${dnskeyfile}" -v

+ 1
- 7
dns_scripts/dns_del_nsupdate View File

@ -6,10 +6,4 @@ dnskeyfile="path/to/bla.key"
fulldomain="$1"
token="$2"
updatefile=$(mktemp)
printf "update delete _acme-challenge.%s. 300 in TXT \"%s\"\n\n" "${fulldomain}" "${token}" > "${updatefile}"
nsupdate -k "${dnskeyfile}" -v "${updatefile}"
rm -f "${updatefile}"
printf "update delete _acme-challenge.%s. 300 in TXT \"%s\"\n\n" "${fulldomain}" "${token}" | nsupdate -k "${dnskeyfile}" -v

Loading…
Cancel
Save