Gandi LiveDNS Updater - Command line tool to keep your dynamic ip up to date
1.1K
Gandi LiveDNS Updater - Command line tool to keep your dynamic ip up to date.
USER is your Gandi user account).The recommended way to install this package is through pip.
pip install --user giu
To use giu you need to create a config.toml file to hold the minimal set of
configurations.
[api]
url = 'https://dns.api.gandi.net/v5/livedns'
key = 'YOUR_KEY'
[dns]
domain = 'example.com'
records = [
{'type' = 'A', 'name' = '@', 'ttl' = 18000},
{'type' = 'A', 'name' = '*', 'ttl' = 1800},
]
[resolver]
providers = [
'http://ipecho.net/plain',
'https://ifconfig.me/ip',
'http://www.mon-ip.fr'
]
In this example the config is in the current folder.
docker-composer up -d
By default the process will check your configuration every hour and update it if the process detects a drift in the desired state.
In this example the config file was created on $HOME/.giu/example.com.toml.
giu sync --conf $HOME/.giu/example.com.toml
In this example the config file was created on $HOME/.giu/example.com.toml.
$ crontab -e
* */2 * * * giu sync --conf $HOME/.giu/example.com.toml
In this example a config file in the $PWD folder is mounted in /app/conf and
the command runs in dry-run mode.
docker run -it --rm -v $PWD:/app/conf yriveiro/giu:dev giu sync --dry-run --config /app/conf/config.toml
✔ Dynamic IP fetched.
ℹ Current dynamic IP: XXX.XXX.XX.XX.
ℹ Dry run mode on.
ℹ TTL for 'A' record '@' on config: 1800
✔ 'A' record '@' for foo.bar from Gandi LiveDNS
ℹ IP for 'A' record '@' on Gandi LiveDNS: XXX.XXX.XXX.XXX
ℹ TTL for 'A' record '@' on Gandi LiveDNS: 18000
ℹ Update needed, dry run mode, no update done.
ℹ TTL for 'A' record '*' on config: 1800
✔ 'A' record '*' for toranja.tech from Gandi LiveDNS
ℹ IP for 'A' record '*' on Gandi LiveDNS: XXX.XXX.XXX.XXX
ℹ TTL for 'A' record '*' on Gandi LiveDNS: 1800
ℹ Update needed, dry run mode, no update done.
/app/conf folder is not configurable once the Docker image has hardening
applyed and that is the writable folder.
Some improvements that I have ff the top of my head:
put command to create entries like CNAMES and so on.delete command to delete entriesbackup command to do backupsContent type
Image
Digest
Size
23.5 MB
Last updated
over 5 years ago
docker pull yriveiro/giu