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.
 
 
 
 
 
 

15 lines
335 B

#!/bin/bash
# example of script to add token to local dns using nsupdate
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}"