53
|
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 |