So what I need is a script to notify me when my IP changes which I can use instead until my domain works again. I mostly need this for VPN. And off I went to write such a script:
It is a pretty simple script. It will grab your current IP, and then in an infinite loop keep checking to see if it changes. If it did change, it will send a notification to admin. Then it will wait 20 minutes (1200 seconds) and check again. Since I am using Pushbullet with Synology, I get notified immediately. Having it email instead of notify would of been nice, but it would of involved more work to setup and ipkg to install a third-party program.
I called this script ip_notify.sh and placed it in /opt/local/bin. In order to get it to automatically run on boot, I put the following command in /etc/rc.local:
And that was it. Make sure the files are executable (chmod +x file_name).