This simple bash script checks your current public IP and compares it to the previous days public IP (depending on cron job). Email alert is sent if IP has changed.
Credit goes to Ronny Bull – http://ronnybull.com/2011/08/10/bash-dynamic-public-ip-address-monitor-script/
Pre-req – install curl and postfix
apt-get install curl apt-get install postfix