You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/bash
|
|
|
|
|
|
# example of script to add token to local dns using nsupdate
|
|
|
|
|
|
dnskeyfile="path/to/bla.key"
|
|
|
server="localhost"
|
|
|
fulldomain="$1"
|
|
|
token="$2"
|
|
|
|
|
|
updatefile=$(mktemp)
|
|
|
|
|
|
printf "server ${server}\n" > "${updatefile}"
|
|
|
printf "update add _acme-challenge.%s. 300 in TXT \"%s\"\n\n" "${fulldomain}" "${token}" >> "${updatefile}"
|
|
|
|
|
|
nsupdate -k "${dnskeyfile}" -v "${updatefile}"
|
|
|
|
|
|
rm -f "${updatefile}"
|