Newer
Older
#!/bin/bash
cd /data/domains
my_ip=`curl http://ipv4.icanhazip.com/`
echo "My IP is $my_ip"
for domain in `ls .`; do
domain_ip=`host ${domain} | awk '/has address/ { print $4 }'`
if [[ "${domain_ip}" != "${my_ip}" ]]; then
echo "$domain has this IP: $domain_ip"
fi
done