Skip to content

Instantly share code, notes, and snippets.

@s10wen
Created May 23, 2014 12:55
Show Gist options
  • Save s10wen/823e76d80322b0f28740 to your computer and use it in GitHub Desktop.
Save s10wen/823e76d80322b0f28740 to your computer and use it in GitHub Desktop.
Bash script to watch for DNS changes
#!/bin/bash
while :;
do
echo "$(date)"
dig sitename.com;
sleep 600;
done
@s10wen
Copy link
Author

s10wen commented May 23, 2014

Copy code and save file as watch.sh, then run sh watch.sh. This will timestamp, dig, then wait 10 minutes, then repeat. Obviously change sitename.com for the site you'd like to watch 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment