Mercurial > hg > anonet-resdb
changeset 1226:4e07b815084b draft
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
author | epoch <epoch@hack.thebackupbox.net> |
---|---|
date | Wed, 01 May 2019 17:47:33 +0000 |
parents | 4ad373a12a0a |
children | 3dd91b8a9ab1 7259436991c5 |
files | scripts/nameserver_autogen/bind_tld_zonefile.sh scripts/nameserver_autogen/bind_tld_zonefile_all.sh |
diffstat | 2 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/nameserver_autogen/bind_tld_zonefile.sh Wed Sep 26 22:49:03 2018 +0000 +++ b/scripts/nameserver_autogen/bind_tld_zonefile.sh Wed May 01 17:47:33 2019 +0000 @@ -16,13 +16,13 @@ DOM="3.7.f.6.9.3.e.1.3.6.d.f.ip6.arpa" RDNS_ZONEFILE="$ZONEFILE_DIR/$DOM" -echo -n 'generating IPv6 reverse lookup zonefile for...' >&2 +echo -n 'generating IPv6 reverse lookup zonefile for' $DOM '...' >&2 echo "; this zonefile generated on: `date -u`" > "$RDNS_ZONEFILE".tmp echo '$TTL 3600' >> "$RDNS_ZONEFILE".tmp echo '$ORIGIN' $DOM. >> "$RDNS_ZONEFILE".tmp -echo '@ IN SOA @ root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$RDNS_ZONEFILE".tmp -echo '@ IN NS @' >> "$RDNS_ZONEFILE".tmp -echo '@ IN A 127.0.0.1' >> "$RDNS_ZONEFILE".tmp +echo $DOM. 'IN SOA' $DOM. 'root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$RDNS_ZONEFILE".tmp +echo $DOM. 'IN NS ' $DOM. >> "$RDNS_ZONEFILE".tmp +echo $DOM. 'IN A 127.0.0.1' >> "$RDNS_ZONEFILE".tmp cd $RESDB_PATH/db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/ for i in */*/*/*/ns/*;do a=$(printf "%s\n" "$i" | cut -d/ -f1-4 | tr '/' '.' | rev) @@ -55,9 +55,9 @@ echo "; this zonefile genreated on: `date -u`" > "$RDNS_ZONEFILE".tmp echo '$TTL 3600' >> "$RDNS_ZONEFILE".tmp echo '$ORIGIN' $DOM. >> "$RDNS_ZONEFILE".tmp - echo '@ IN SOA @ root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$RDNS_ZONEFILE".tmp - echo '@ IN NS @' >> "$RDNS_ZONEFILE".tmp - echo '@ IN A 127.0.0.1' >> "$RDNS_ZONEFILE".tmp + echo $DOM. 'IN SOA' $DOM. 'root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$RDNS_ZONEFILE".tmp + echo $DOM. 'IN NS ' $DOM. >> "$RDNS_ZONEFILE".tmp + echo $DOM. 'IN A 127.0.0.1' >> "$RDNS_ZONEFILE".tmp for i in */*/ns/*;do [ -e "$i" ] || continue @@ -82,9 +82,9 @@ echo "; this zonefile genreated on: `date -u`" > "$ANO_ZONEFILE".tmp echo '$TTL 3600' >> "$ANO_ZONEFILE".tmp echo '$ORIGIN' $TLD. >> "$ANO_ZONEFILE".tmp - echo '@ IN SOA @ root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$ANO_ZONEFILE".tmp - echo '@ IN NS @' >> "$ANO_ZONEFILE".tmp - echo '@ IN A 127.0.0.1' >> "$ANO_ZONEFILE".tmp + echo $TLD. 'IN SOA' $TLD. 'root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$ANO_ZONEFILE".tmp + echo $TLD. 'IN NS ' $TLD. >> "$ANO_ZONEFILE".tmp + echo $TLD. 'IN A 127.0.0.1' >> "$ANO_ZONEFILE".tmp for name in *;do if [ -d "$name/ns" ];then
--- a/scripts/nameserver_autogen/bind_tld_zonefile_all.sh Wed Sep 26 22:49:03 2018 +0000 +++ b/scripts/nameserver_autogen/bind_tld_zonefile_all.sh Wed May 01 17:47:33 2019 +0000 @@ -1,8 +1,8 @@ #!/bin/sh # be sure to set these variables first. -#ANO_ZONEFILE=/etc/namedb/ano -#RDNS_ZONEFILE=/etc/namedb/21.in-addr.arpa -#RESDB_PATH=/services/resdb/resdb +#export ANO_ZONEFILE=/etc/namedb/ano +#export RDNS_ZONEFILE=/etc/namedb/21.in-addr.arpa +#export RESDB_PATH=/services/resdb/resdb if [ ! "$ANO_ZONEFILE" ];then echo "You forgot to set some variables. read the source plzkthx." >&2 exit 1