removed extra dig

master
David Kebler 2024-08-22 11:26:18 -07:00
parent 8502fb04a9
commit d0e6ada9c7
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ for dnsconf in *.conf.dns; do
for host in $(sed -e 's/[ ,]/\n/g' $conf | sed -n 's/[Dd][Nn][Ss]://p'); do for host in $(sed -e 's/[ ,]/\n/g' $conf | sed -n 's/[Dd][Nn][Ss]://p'); do
echo host to lookup $host, echo host to lookup $host,
if ip=$(_getip $host); then if ip=$(_getip $host); then
echo substituting $(dig +short $host) echo found ip, substituting $ip
sudo sed -i 's/[Dd][Nn][Ss]:'$host'/'$ip'/g' $conf sudo sed -i 's/[Dd][Nn][Ss]:'$host'/'$ip'/g' $conf
else else
echo unable to find ip address for $host echo unable to find ip address for $host