Hello experts, I do not want to querry the world, but only my own Name Server for CNAME configured (or not).
Currently I am updating my web administration interface and I have lost
over the time a script, which queried my Name Server for CNAMES.
E.g. if I have a physical server <vserver04.tamay-dogan.net> I like to
know, which CNAMEs (on MY Name Server) pointing to it as
www.electronica.tamay-dogan.net IN CNAME vserver04.tamay-dogan.net
OK, I can grep the whole /etc/bind/master/ directory, but since my Name
Server is responsable for several 1000 (sub)domains, the execution of
the script takes ages!
----[tdgetincname]------------------------------------------------------
#!/bin/bash
VSERVER="$1"
LIST=`cd /etc/bind/master/ && find -type f |grep -v -E
"(.conf|.signed|.private|.key)$" |sed 's|^\./||' |sort`
for FILE in ${LIST}
do
RET=`cd /etc/bind/master/ && grep -E "IN CNAME.*${VSERVER}" ${FILE} |sed
"s|\.[ \t]*IN CNAME.*||"`
if [ -n "${RET}" ]
then
echo "${RET}"
fi
done
------------------------------------------------------------------------
Note: If I do not the "cd /etc/bind/master/ &&",
I exceed the maximum lenght of the commandline.
Any ideas how to do this better?
Thanks in avance
--
Michelle Konzack ITSystems
GNU/Linux Developer 0033-6-61925193
signature.asc
Description: Digital signature
_______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/bind-users

