Browse Source

Add dns_scripts/dns_nodelete

This is useful for debugging; it leaves any tokens in the DNS &
records its environment.

It's only meaningful for debuggers (and some problem reports
for which ask for them.
pull/841/head
Timothe Litt 2 years ago
parent
commit
90ddc4c954
Failed to extract signature
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      dns_scripts/dns_nodelete

+ 20
- 0
dns_scripts/dns_nodelete View File

@ -0,0 +1,20 @@
#!/bin/bash
# For debugging, use this as the DNS update "delete" driver
#
# It will log whatever seems interesting in /tmp/dns_nodelete.log, but
# it will NOT delete the tokens. Currently used with nsupdate, but
# variables for other drivers are welcome. This is mainly for debugging
# CNAME aliasing & token cleanup tools.
(
NOLOG="/tmp/dns_nodelete.log"
NOSTAMP="$(date +'%a, %d-%b-%Y %T.%N'): "
NODOMAIN="$1"
NOTOKEN="$2"
NOVARS="DNS_.*|*NODOMAIN|NOTOKEN*"
set | grep -E "^($NOVARS)=" | while read -r ; do echo "${NOSTAMP}$REPLY" >>$NOLOG; done
echo "${NOSTAMP}update delete ${DNS_ZONE:-"_acme-challenge.${NODOMAIN}."} 300 in TXT \"${NOTOKEN}\"\n" >>"$NOLOG"
)

Loading…
Cancel
Save