Attempting to fix markdown syntax
Fix cap
Add punctuation
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 settings.json.example
to settings.json
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.
Prerequisites:
Pushover account
Clone the repository:
git clone https://github.com/mtthwjrgnsn/ip_push.git
Change dirs into the repo:
cd ip_push
Install requirements:
pip install -r requirements.txt
Use setup.py
to configure your secrets:
python3 setup.py
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:
~mjorgensen/public-inbox@lists.sr.ht. Please use --send-prefix
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.