fix: knsupdate commands are node-specific
This commit is contained in:
parent
7ebfd568bc
commit
29f7d5ec51
1 changed files with 7 additions and 7 deletions
14
opendkimd.sh
14
opendkimd.sh
|
@ -50,8 +50,13 @@ case $1 in
|
||||||
|
|
||||||
txt="`cat $tkey | tr -d "\n" | cut -d '"' -f 2,4 | tr -d '"' | tr -d " "`"
|
txt="`cat $tkey | tr -d "\n" | cut -d '"' -f 2,4 | tr -d '"' | tr -d " "`"
|
||||||
|
|
||||||
# Craft record
|
# Register the TXT record on every nameserver. Log failures but
|
||||||
cat >/tmp/dns <<DNS
|
# continue anyway.
|
||||||
|
ok "Registering public key records"
|
||||||
|
for node in `drill -Q ns $SUTTY`; do
|
||||||
|
|
||||||
|
# Craft record
|
||||||
|
cat >/tmp/dns <<DNS
|
||||||
server knot.$node
|
server knot.$node
|
||||||
zone _domainkey.${SUTTY}.
|
zone _domainkey.${SUTTY}.
|
||||||
origin _domainkey.${SUTTY}.
|
origin _domainkey.${SUTTY}.
|
||||||
|
@ -61,11 +66,6 @@ add ${dkey}. TXT "${txt}"
|
||||||
send
|
send
|
||||||
quit
|
quit
|
||||||
DNS
|
DNS
|
||||||
|
|
||||||
# Register the TXT record on every nameserver. Log failures but
|
|
||||||
# continue anyway.
|
|
||||||
ok "Registering public key records"
|
|
||||||
for node in `drill -Q ns $SUTTY`; do
|
|
||||||
if knsupdate /tmp/dns; then
|
if knsupdate /tmp/dns; then
|
||||||
ok "Registered public key record at ${node}"
|
ok "Registered public key record at ${node}"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue