diff options
author | Nick <nick@somerandomnick.ano> | 2010-06-15 20:12:25 +0000 |
---|---|---|
committer | Nick <nick@somerandomnick.ano> | 2010-06-15 20:12:25 +0000 |
commit | 49fa2b238b220eff410c42abbea8eb8c57b7c64b (patch) | |
tree | 4265109b775791037c56b9dcd656ef3c9eb6e693 /scripts | |
parent | 59c9113ec4bcbc0432e0615abed3bc44886edc88 (diff) | |
download | resdb-49fa2b238b220eff410c42abbea8eb8c57b7c64b.tar.gz resdb-49fa2b238b220eff410c42abbea8eb8c57b7c64b.zip |
added an export script for dn42
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/export/dn42_registry | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/export/dn42_registry b/scripts/export/dn42_registry new file mode 100755 index 0000000..8805926 --- /dev/null +++ b/scripts/export/dn42_registry @@ -0,0 +1,20 @@ +#!/bin/sh +if ! ./scripts/check_db_safety; then + exit 1 +fi +mkdir -p export/dn42/data/dns || exit 1 +for d in db/dom/dn42/* ; do + domain="`basename $d`.dn42" + owner="`cat $d/owner | tr a-z A-Z`-DN42" + ( + echo -e "domain:\t\t$domain" + for ns in $d/ns/* ; do + nsname="`basename $ns`" + nsip="`cat $ns`" + echo -e "nserver:\t$nsname $nsip" + done + echo -e "status:\t\tconnect" + echo -e "admin-c:\t$owner" + echo -e "tech-c:\t\t$owner" + ) > "export/dn42/data/dns/$domain" +done |