A Python module to renew public IP address associated with a Dynu domain.
Project description
dynu-renew
A Python module to renew public IP address associated with a Dynu domain.
This Python module, through the "renew_domains_ip" function, retrieves the current public IP address, stores it in a local SQLite database, and communicates it to Dynu.
Quick Start
First you need to download the "dynu-renew" package, for example via pip:
pip install dynu-renew
At this point you need to create the "instance" folder:
mkdir instance
And create the "config.py" file inside, taking inspiration from what you can find inside the "configs" folder of this repo.
In the "DYNU_PASSWORD" field I recommend you enter the Dynu IP Update Password instead of the Dynu account access password, because the Dynu IP Update Password has limited privileges.
Finally, to start it via CLI simply send the command:
python -m dynu_renew
If the output is empty, then the IP renewal was successful, otherwise the error received from the Dynu API is returned.
I recommend you add scheduled execution of dynu-renew by adding it to the crontab, as follows:
crontab -e
Then inserting a new line like this:
*/5 * * * * python -m dynu_renew >> ~/dynu_renew.log 2>&1
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dynu_renew-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03848ffeda79946acc7141e2e1d0e6d69b3fc7c3951d39b68456ce270126b179 |
|
MD5 | 82db531aaa80d61159041609d4f1eaf9 |
|
BLAKE2b-256 | fbc485f703c8fec0bbbbede79886bd8fe7cd5a30eac5e839c567ef4d04a8e321 |