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 220.127.116.11 with one of your ISP’s DNS server IP addresses. And obviously edit email@example.com 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=18.104.22.168 (you can check for an IP aswell) dig -t ns jamesmcdonald.id.au @22.214.171.124 | \ grep $CHECKTHIS \ && if [ ! -f sent ] ; \ then touch sent ; \ echo Sending ; \ echo DNS has propagated | \ mail -s "DNS Updated" firstname.lastname@example.org ; \ 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)