Introduction
There may be a need to determine what domains are no longer resolving to a server for the potential removal of that domain from the server or just for maintenance purposes.
Procedure
The following one-liner while read loop will output the domains in /etc/userdatadomains and provide the IP if the domain resolves.
awk -F : {'print $1'} /etc/userdatadomains | grep -v nobody | while read x; do echo "checking $x"; echo "$x resolves to $(dig +short $x)"; echo; done
Comments
0 comments
Article is closed for comments.