view scripts/nameserver_autogen/dnsmasq_tld_conffile @ 85:f091fb99fcf9 draft

scripts/nameserver_autogen/dnsmasq_tld_conffile modified
author Antonio Quartulli <ordex@ritirata.org>
date Tue, 03 Aug 2010 17:28:17 +0200
parents db00fd40866c
children 17e4bef39c08
line wrap: on
line source

#!/bin/bash
#Remember to redirect the output into some file!

for tld in $(ls db/dom/); do 
	for domain in $(ls db/dom/${tld}/); do 
		for ns in $(cat db/dom/${tld}/${domain}/ns/*); do 
			STR="server=/${domain}.${tld}/${ns}"
			if [ "$(grep $STR /etc/dnsmasq.conf)" = "" ]; then
				echo $STR
			fi
		done; 
	done; 
done