#!/bin/bash
RR=www.com
[ #$ -le 1 ]&&{ echo "usage: ${0} -h <ip>"; exit 126; }
while getopts "h:" OPT;do
case $OPT in
h)host=$OPTARG;;
*)echo "usage: ${0} -h <ip>"&&exit 1;;
esac
done
rndc flushname ${RR}
dig @${host} soa ${RR}|grep "\<${RR}\>" >/dev/null
exit $?
RR=www.com
[ #$ -le 1 ]&&{ echo "usage: ${0} -h <ip>"; exit 126; }
while getopts "h:" OPT;do
case $OPT in
h)host=$OPTARG;;
*)echo "usage: ${0} -h <ip>"&&exit 1;;
esac
done
rndc flushname ${RR}
dig @${host} soa ${RR}|grep "\<${RR}\>" >/dev/null
exit $?