Script to update a DNS record on Cloudflare.
Just clone this repository and run pip install
:
git clone https://github.com/vs-araujo/dns_updater && \
cd dns_updater && \
pip install .
After installation, you should have access to the update_dns
command through
your shell.
The script uses the following environment variables, some of them are required for it to run.
You can either export
them or use a .env
file:
Path to the script log file. Default is dns_updater.log
.
Path to the cache of last IP value successfully updated. Dafault is dns_updater_cache
.
API URL to get the current IP. The API must return only the IP value in the Response body.
Cloudflare API token
ID of the record zone
Record ID
Record name
Record type
If is proxied by Cloudflare