diff options
author | Nick <nick@somerandomnick.ano> | 2010-04-19 06:10:07 +0000 |
---|---|---|
committer | Nick <nick@somerandomnick.ano> | 2010-04-19 06:10:07 +0000 |
commit | b559df204f4d99b9be8cb86686f844f33c687b19 (patch) | |
tree | 0ddeb523898731e50b1ee0bfc6a93a6a7400844a /scripts/nameserver_autogen | |
parent | b036de602aa1ec18e7a4da07f4a7a76932441f7c (diff) | |
download | resdb-b559df204f4d99b9be8cb86686f844f33c687b19.tar.gz resdb-b559df204f4d99b9be8cb86686f844f33c687b19.zip |
coded a tinydns datafile generator
Diffstat (limited to 'scripts/nameserver_autogen')
-rwxr-xr-x | scripts/nameserver_autogen/tinydns_tld_datafile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/nameserver_autogen/tinydns_tld_datafile b/scripts/nameserver_autogen/tinydns_tld_datafile new file mode 100755 index 0000000..ff84576 --- /dev/null +++ b/scripts/nameserver_autogen/tinydns_tld_datafile @@ -0,0 +1,19 @@ +#!/bin/sh +if ! ./scripts/check_db_safety; then + exit 1 +fi +tldsrvrname="$(./scripts/conf_var tinydns__tldsrvrname uz5fvb7zdqyuz4q8ysjdfuf04kzd2lrt0l6fp4uyguxdg5tfut06ck.anons.somerandomnick.ano)" +tldsrvrip="$(./scripts/conf_var tinydns__tldsrvrip 1.0.27.37)" +for tld in db/dom/* ; do + tldname="$(basename $tld)" + echo "+$tldsrvrname:$tldsrvrip:3600" + echo ".$tldname::$tldsrvrname" + for zone in $tld/* ; do + for ns in $zone/ns/* ; do + domain="$(basename $zone).$(basename $tld)" + nsip="$(cat $ns)" + nsname="$(basename $ns)" + echo "&$domain:$nsip:$nsname" + done + done +done |