Mercurial > hg > anonet-resdb
annotate scripts/nameserver_autogen/dnsmasq_tld_conffile @ 91:17e4bef39c08 draft
Modification of scripts/nameserver_autogen/dnsmasq_tld_conffile
author | pragmo <pragmo@pragmo.ano> |
---|---|
date | Thu, 05 Aug 2010 02:45:46 +0200 |
parents | f091fb99fcf9 |
children | 9e6718a2d6c6 |
rev | line source |
---|---|
82 | 1 #!/bin/bash |
2 #Remember to redirect the output into some file! | |
3 | |
91
17e4bef39c08
Modification of scripts/nameserver_autogen/dnsmasq_tld_conffile
pragmo <pragmo@pragmo.ano>
parents:
85
diff
changeset
|
4 sh scripts/check_db_safety || exit 1 |
17e4bef39c08
Modification of scripts/nameserver_autogen/dnsmasq_tld_conffile
pragmo <pragmo@pragmo.ano>
parents:
85
diff
changeset
|
5 |
82 | 6 for tld in $(ls db/dom/); do |
7 for domain in $(ls db/dom/${tld}/); do | |
8 for ns in $(cat db/dom/${tld}/${domain}/ns/*); do | |
85
f091fb99fcf9
scripts/nameserver_autogen/dnsmasq_tld_conffile modified
Antonio Quartulli <ordex@ritirata.org>
parents:
82
diff
changeset
|
9 STR="server=/${domain}.${tld}/${ns}" |
f091fb99fcf9
scripts/nameserver_autogen/dnsmasq_tld_conffile modified
Antonio Quartulli <ordex@ritirata.org>
parents:
82
diff
changeset
|
10 if [ "$(grep $STR /etc/dnsmasq.conf)" = "" ]; then |
f091fb99fcf9
scripts/nameserver_autogen/dnsmasq_tld_conffile modified
Antonio Quartulli <ordex@ritirata.org>
parents:
82
diff
changeset
|
11 echo $STR |
f091fb99fcf9
scripts/nameserver_autogen/dnsmasq_tld_conffile modified
Antonio Quartulli <ordex@ritirata.org>
parents:
82
diff
changeset
|
12 fi |
82 | 13 done; |
14 done; | |
15 done |