]> mj.ucw.cz Git - nsc-5.git/blob - bin/chkdom
Initial revision
[nsc-5.git] / bin / chkdom
1 #!/bin/sh
2 rm -f /tmp/chkdom.out
3 if [ -z "$1" ] ; then
4         D=`cat cf/domains | sed '/^PRIMARY/{s/^PRIMARY(\([^,]*\)).*$/\1/;p;};/^SECONDARY/{s/^SECONDARY(\([^,]*\),.*).*$/\1/;p;};/^REVERSE([0-9]*\./{s/^REVERSE(\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\),.*)/\3.\2.\1.in-addr.arpa/;p;};d'`
5         for dom in $D ; do
6                 echo "Checking $dom..."
7                 done
8         host -a -D -C -A -L 10 -S -I _ -l $dom >>/tmp/chkdom.out 2>&1
9 else
10         host -a -D -C -A -L 10 -S -I _ -l $@ >>/tmp/chkdom.out 2>&1
11 fi
12 grep !!! /tmp/chkdom.out