From fafbdd172f9d7da37955b4d732793155aee9bcc9 Mon Sep 17 00:00:00 2001 From: Eduard Veit Date: Fri, 20 Dec 2019 17:36:42 +0100 Subject: [PATCH] fixing API-XML syntax and add some documentation --- .gitignore | 1 + README.md | 12 +++++++++++- .../{sample.config.dist => dist.config.sample} | 6 +++++- nsupdate.sh | 12 ++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) rename nsupdate.d/{sample.config.dist => dist.config.sample} (61%) diff --git a/.gitignore b/.gitignore index a870a48..45687d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.config +!dist.config.sample nsupdate.sh.log diff --git a/README.md b/README.md index 551c623..b9b2c0a 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,20 @@ In order to run you need to have _curl_ and _awk_ installed, as well as _drill_ Simply download the `master.zip` and extract it, e.g., using `wget` and `7z x master.zip`. -Place your config files in the `nsupdate.d` folder. A `sample.config.dist` is provided. At least one config file needs to exist, ending with `.config. +Place your config files in the `nsupdate.d` folder. A `dist.config.sample` is provided. At least one config file needs to exist, ending with `.config. +All .config files will be processed by looping them. +Simply copy the provided dist.config.sample and adjust your config to your needs. +For home.example.com you may create: +home.example.com-ipv4.config and/or +home.example.com-ipv6.config ## Changelog +**2019-12-20** + +- Fixing API-XML syntax +- Added some more documentation + **2015-07-22** - Changed the way how the existence of config files is checked diff --git a/nsupdate.d/sample.config.dist b/nsupdate.d/dist.config.sample similarity index 61% rename from nsupdate.d/sample.config.dist rename to nsupdate.d/dist.config.sample index 4d1cc21..185200e 100755 --- a/nsupdate.d/sample.config.dist +++ b/nsupdate.d/dist.config.sample @@ -1,9 +1,13 @@ # nsupdate.config +# The nsupdate.sh is processing all .config files by looping. +# If you want to update an IPv4 and an IPv6 record you need two config files. # Log file name. LOG="$0.log" # From which site should we get your WAN IP? +# Note that for IPv4 or IPv6 the IP_CHECK_SITE should work +# e.g. for IPv4 use api.ipify.org and for IPv6 use api6.ipify.org IP_CHECK_SITE="https://api.ipify.org/" # Use drill instead of nslookup for hostname lookup. @@ -23,7 +27,7 @@ INWX_USER="USERNAME" INWX_PASS="PASSWORD" # The hostname that you want to update and it's ID from the inwx interface. -# Note: You can get the domain ID while editing the given nameserver entry by +# Note: You can get the specific domain record ID while editing the given nameserver entry by # inspecting the target URL of the save button. DOMAIN="DOMAIN" INWX_DOMAIN_ID="123456789" diff --git a/nsupdate.sh b/nsupdate.sh index ffc2efd..b5d8c34 100755 --- a/nsupdate.sh +++ b/nsupdate.sh @@ -91,6 +91,12 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then $INWX_USER + + lang + + en + + pass @@ -109,6 +115,12 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then $WAN_IP + + ttl + + 300 + +