docs: add crontab example to README
This commit is contained in:
parent
4d484ebd60
commit
5715723863
1 changed files with 18 additions and 0 deletions
18
README.md
18
README.md
|
@ -33,6 +33,10 @@ domains:
|
||||||
- subdomain2.example.com
|
- subdomain2.example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**NOTE:** Make sure you have manually registered each subdomain you are listing in your Ionos account.
|
||||||
|
The script currently does not handle adding subdomains for you.
|
||||||
|
Attempting to update the DNS entry for an unregistered domain will cause the API call to fail.
|
||||||
|
|
||||||
You may optionally set a descriptive string which is sent along with the update:
|
You may optionally set a descriptive string which is sent along with the update:
|
||||||
```yaml
|
```yaml
|
||||||
description: "Dynamic DNS update."
|
description: "Dynamic DNS update."
|
||||||
|
@ -40,3 +44,17 @@ description: "Dynamic DNS update."
|
||||||
|
|
||||||
As of right now, I am actually not sure what the description is needed for, but the API requires it.
|
As of right now, I am actually not sure what the description is needed for, but the API requires it.
|
||||||
The value displayed above is used by default, if you don't override it inside `config.yml`.
|
The value displayed above is used by default, if you don't override it inside `config.yml`.
|
||||||
|
|
||||||
|
### Regular DNS updates
|
||||||
|
|
||||||
|
In order to keep your DNS records synchronized with your public IP address, you should run the update script periodically.
|
||||||
|
As of this writing, Ionos limit dynamic DNS updates via API to 2 requests per minute, so don't send requests more frequently than that.
|
||||||
|
|
||||||
|
In order to update your DNS IPs once every minute, call the script once a minute. (Duh!)
|
||||||
|
You can set your crontab to the following to achieve this:
|
||||||
|
|
||||||
|
```
|
||||||
|
*/1 * * * * /path/to/dnsupdate.py
|
||||||
|
```
|
||||||
|
|
||||||
|
Just make sure that the script is executable and located in the same directory as `config.yml`.
|
||||||
|
|
Loading…
Add table
Reference in a new issue