Dynamically update an A record on Gandi's LiveDNS system to reflect the current public IP address where this script is running.
pip install poetry
python -m poetry install
- Add the correct values into
.env.example
and rename it to.env
- Add to your crontab to run periodically
For Example:
*/15 * * * * python -m poetry run python /path/to/script/livedns.py >/dev/null 2>&1
if you hate poetry then the only deps you need are:
- requests
- python-dotenv
The domain
must be the root (i.e. what you purchase from Gandi), any additional sub-records should be added in to the record
portion. For example, the current .env.example
file would be editing dynamic.test.com
.