If you have delegated your DNS to another hosting provider you may want to send yourself an email when your DNS domain delegation has propogated (so you can notify people after the change and not have everyone saying “I can’t get to your site”).
Create a script as follows and then install crontab to run it every X minutes.
The email you receive will have a time stamp to the nearest X minutes.
Create checkit.sh in your home directory
Replace jamesmcdonald.id.au with your domain and 22.214.171.124 with one of your ISP’s DNS server IP addresses. And obviously edit firstname.lastname@example.org to be your own email address.
#!/bin/sh # edit this to be a substring of the new dns servers you are moving to. # ie. my new DNS servers are # ns1.dreamhost.com # ns2.dreamhost.com # ns2.dreamhost.com # so setting it to dreamhost.com will match when the # dig query returns the newly propogated server list CHECKTHIS=dreamhost.com # CHECKTHIS=dyndns # CHECKTHIS=126.96.36.199 (you can check for an IP aswell) dig -t ns jamesmcdonald.id.au @188.8.131.52 | \ grep $CHECKTHIS \ && if [ ! -f sent ] ; \ then touch sent ; \ echo Sending ; \ echo DNS has propagated | \ mail -s "DNS Updated" email@example.com ; \ fi
Crontab to run above script every 5 minutes
# m h dom mon dow command */5 * * * * $HOME/checkit.sh
You obviously need the mail command installed on your box
apt-get install mailx and dig aswell
apt-get install dnsutils (this is for Ubuntu/Debian)