Sends a notification via Pushover if the server's external IP address changes. Useful in case you can't use dynamic DNS.
External IP address is found using WTF is my IP, which requests that you rate-limit yourself to one request per minute. Failure to do so may result in being blocked.
Settings go in the
settings.json file. An example is included with the proper
keys, all you have to do is copy
update for your specific needs.
The user_key, app_token, key-values come from your Pushover account.
The server_location key-value is used to distinguish which server sent the notification, in case you use this from multiple servers that exist behind different IP addresses.
This was written and tested under Python 3.
Installation instruction are below. Additional information, including how to obtain a pushover app token, can be found in the project wiki.
Clone the repository:
git clone https://github.com/mtthwjrgnsn/ip_push.git
Change dirs into the repo:
pip install -r requirements.txt
setup.py to configure your secrets:
This program doesn't include scheduling on its own. I recommend you to set up a cron job to run as often as you'd like.
Example crontab entry:
*/5 * * * * cd /path/to/ip_push; ./ippush.py >/dev/null 2>&1
This will run ippush.py every 5 minutes.
Documentation is available here.
Discussion and patches welcome at my public inbox:
~email@example.com. Please use
PATCH ip_push for clarity when sending patches.
Bugs, issues, and tasks are at the tracker: ~mjorgensen/ip_push
This project is licensed under the terms of the MIT license.
Finally, this project was inspired by my brother's project, ip_tweet.