This page was exported from phaq [ http://phaq.phunsites.net ] Export date:Sat Apr 20 15:54:27 2024 / +0000 GMT ___________________________________________________ Title: Notify me if IP is propagated in DNS --------------------------------------------------- So here's my short snipped of a bash shell loop I hacked up. It's only purpose is to check in DNS repeatedly if a certain IP address is propagated for a given fully qualified domain name. If the script sees the IP address, it would "ring the bell" and exit, otherwise it sleeps for a while and repeats the check. This way I could leave it running in the console and - whenever the IP appeared in DNS - I'd get an audible alert. No big trick after all ;-) Here's the code: $ while [ : ] ; do echo scanning ... ; dig @DNSSERVER FQDN | grep IPADDR && { echo -e "a"; break; } || sleep 5; done And here's what it looks like in action: scanning ... scanning ... scanning ... scanning ... scanning ... scanning ... my-cool-fqdn.some.domain.tld. 3600 IN A 192.0.2.1 [you would hear a "bing" tone at this point as well] --------------------------------------------------- Images: --------------------------------------------------- --------------------------------------------------- Post date: 2012-05-26 13:30:41 Post date GMT: 2012-05-26 12:30:41 Post modified date: 2014-08-03 11:38:49 Post modified date GMT: 2014-08-03 10:38:49 ____________________________________________________________________________________________ Export of Post and Page as text file has been powered by [ Universal Post Manager ] plugin from www.gconverters.com