Sh3ll



Directory :  /scripts2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Current File : //scripts2/locate_dns_zone.sh
#!/bin/bash
# Locate a DNS zone searching named files.

TARGET=$1

res_varnamed=$(find /var/named -name "$1*")
res_namedconf=$(grep -wn "$1" /etc/named.conf)

if [ "$res_varnamed" ]; then
  echo "----- /var/named/ FILES FOUND IN $(hostname) -----"
  for fil in $res_varnamed; do echo $fil; done
  echo ""
fi

if [ "$res_namedconf" ]; then
  echo "----- DNS ZONE FOUND IN /etc/named.conf IN $(hostname) -----"
  echo "$res_namedconf"
  echo ""
fi

if [ "$res_varnamed" ] || [ "$res_namedconf" ]; then
  echo ""
fi

Sh3LL