Update README.md
Rewrote the README to match the usage with the new class implemented
This commit is contained in:
parent
b3e5746b11
commit
3bdf45f015
1 changed files with 16 additions and 1 deletions
17
README.md
17
README.md
|
|
@ -5,7 +5,22 @@ and replacing the IP with the public IP of the machine on which the code is exec
|
||||||
This script was inspired by matt1's gandi-ddns script : [matt1/gandi-ddns](https://github.com/matt1/gandi-ddns)
|
This script was inspired by matt1's gandi-ddns script : [matt1/gandi-ddns](https://github.com/matt1/gandi-ddns)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
The script was designed to be run using a cron task :
|
1. **Define an object of class GanDynDns at the end of the file** :
|
||||||
|
```
|
||||||
|
main = GanDynDns("example.org", "@", "A", "your-api-key")
|
||||||
|
```
|
||||||
|
Or if you want to define multiple domains to update :
|
||||||
|
|
||||||
|
```
|
||||||
|
domain = "example.org"
|
||||||
|
apikey = "your-api-key"
|
||||||
|
|
||||||
|
main = GanDynDns(domain, "@", "A", apikey)
|
||||||
|
mail = GanDynDns(domain, "mail", "A" apikey)
|
||||||
|
```
|
||||||
|
Each time the script runs and the objects are created they check if *the IPs in the DNS record* match the *current public IP*.
|
||||||
|
|
||||||
|
2. **Run the script using a cron task** :
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo crontab -e
|
sudo crontab -e
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue