Mercurial > hg > anonet-resdb
annotate scripts/nameserver_autogen/tinydns_tld_datafile @ 12:41b330b11a33 draft
coded a tinydns datafile generator
author | Nick <nick@somerandomnick.ano> |
---|---|
date | Mon, 19 Apr 2010 06:10:07 +0000 |
parents | |
children | 059b5f3d7808 |
rev | line source |
---|---|
12
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
1 #!/bin/sh |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
2 if ! ./scripts/check_db_safety; then |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
3 exit 1 |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
4 fi |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
5 tldsrvrname="$(./scripts/conf_var tinydns__tldsrvrname uz5fvb7zdqyuz4q8ysjdfuf04kzd2lrt0l6fp4uyguxdg5tfut06ck.anons.somerandomnick.ano)" |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
6 tldsrvrip="$(./scripts/conf_var tinydns__tldsrvrip 1.0.27.37)" |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
7 for tld in db/dom/* ; do |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
8 tldname="$(basename $tld)" |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
9 echo "+$tldsrvrname:$tldsrvrip:3600" |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
10 echo ".$tldname::$tldsrvrname" |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
11 for zone in $tld/* ; do |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
12 for ns in $zone/ns/* ; do |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
13 domain="$(basename $zone).$(basename $tld)" |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
14 nsip="$(cat $ns)" |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
15 nsname="$(basename $ns)" |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
16 echo "&$domain:$nsip:$nsname" |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
17 done |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
18 done |
41b330b11a33
coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
19 done |