Mercurial > hg > anonet-resdb
view scripts/nameserver_autogen/dnsmasq_tld_conffile @ 1230:24c17a3904b9 draft
Revert "dropped the use of @ so the generated zones would work with yadifa too. also exported env vars so child of bind_tld_zonefile_all.sh can use them"
This reverts commit ab834161696a4f9150d1c8f52bb6f0f453950cb7.
author | epoch <epoch@hack.thebackupbox.net> |
---|---|
date | Wed, 10 Jul 2019 01:12:59 +0000 |
parents | 04a5f1cdced7 |
children |
line wrap: on
line source
#!/bin/bash # # Call this script directly from the git root and redirect # its output to a file. # This file should then be imported in the dnsmasq.conf # using the conf-file=path-to-this-file statement. # sh scripts/check_db_safety || exit 1 LS="ls --color=never" for a in $($LS db/ip/); do for b in $($LS db/ip/${a}); do for c in $($LS db/ip/${a}/${b}); do if [ -d db/ip/${a}/${b}/${c}/ns/ ]; then for ns in $($LS db/ip/${a}/${b}/${c}/ns/); do A1=$(scripts/hex2dec ${a}) B1=$(scripts/hex2dec ${b}) C1=$(scripts/hex2dec ${c}) STR="server=/${C1}.${B1}.${A1}.in-addr.arpa/$(scripts/ns2ip -f ${ns})" echo $STR done fi done done done echo for tld in $($LS db/dom/); do for domain in $($LS db/dom/${tld}/); do if [ -d $($LS -d db/dom/${tld}/${domain}/) ]; then if [ -d $($LS -d db/dom/${tld}/${domain}/ns/) ]; then for ns in $($LS db/dom/${tld}/${domain}/ns/); do STR="server=/${domain}.${tld}/$(scripts/ns2ip -f ${ns})" echo $STR done; fi fi done; done