Mercurial > hg > anonet-resdb
comparison scripts/export/dn42_registry @ 53:18e5ecaa4395 draft
added an export script for dn42
author | Nick <nick@somerandomnick.ano> |
---|---|
date | Tue, 15 Jun 2010 20:12:25 +0000 |
parents | |
children | 70a0167e1b20 |
comparison
equal
deleted
inserted
replaced
52:8643d1b779de | 53:18e5ecaa4395 |
---|---|
1 #!/bin/sh | |
2 if ! ./scripts/check_db_safety; then | |
3 exit 1 | |
4 fi | |
5 mkdir -p export/dn42/data/dns || exit 1 | |
6 for d in db/dom/dn42/* ; do | |
7 domain="`basename $d`.dn42" | |
8 owner="`cat $d/owner | tr a-z A-Z`-DN42" | |
9 ( | |
10 echo -e "domain:\t\t$domain" | |
11 for ns in $d/ns/* ; do | |
12 nsname="`basename $ns`" | |
13 nsip="`cat $ns`" | |
14 echo -e "nserver:\t$nsname $nsip" | |
15 done | |
16 echo -e "status:\t\tconnect" | |
17 echo -e "admin-c:\t$owner" | |
18 echo -e "tech-c:\t\t$owner" | |
19 ) > "export/dn42/data/dns/$domain" | |
20 done |