From fad5cfaef88c10e7f547acdcab7275d294f65d62 Mon Sep 17 00:00:00 2001 From: Christoph Schulz Date: Mon, 8 Aug 2016 09:34:49 +0200 Subject: [PATCH 1/2] Echo log file. --- nsupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsupdate.sh b/nsupdate.sh index b7e4517..96c5be1 100755 --- a/nsupdate.sh +++ b/nsupdate.sh @@ -38,7 +38,7 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then for f in $(dirname $0)/nsupdate.d/*.config do if [[ "$SILENT" == "NO" ]]; then - echo "Starting nameserver update with config file $f" + echo "Starting nameserver update with config file $f ($LOG)" fi ## Set record type to IPv4 TYPE=A From 7d751c45f2817da5b942c62c5d34dd16cbabb516 Mon Sep 17 00:00:00 2001 From: Christoph Schulz Date: Mon, 8 Aug 2016 09:37:08 +0200 Subject: [PATCH 2/2] Add LOG to config, clean up some documentation. --- README.md | 14 ++++++-------- nsupdate.d/sample.config.dist | 24 ++++++++++++++---------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1104241..551c623 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # Nameserver update for INWX (nsupdate) -Update nameserver entries at inwx with the current WAN IP (DynDNS) - -nsupdate is a shell script that uses curl and the inwx API to update nameserver entries at INWX with the current WAN IP. It supports IPv4 and IPv6. - -Place your config files in the _nsupdate.d_ folder. +This shell script implements [dynamic DNS](https://en.wikipedia.org/wiki/Dynamic_DNS) using the [inwx](https://www.inwx.de/) API, i.e., it updates nameserver entries with your current WAN IPv4 and IPv6 addresses. ## Requirements In order to run you need to have _curl_ and _awk_ installed, as well as _drill_ or _nslookup_. -At least one config file needs to exist ending with _.config_. A "sample.config.dist" is provided. +## Installation + +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. ## Changelog @@ -31,7 +31,6 @@ At least one config file needs to exist ending with _.config_. A "sample.config. - Added checks for existing config file - Added requirements to README.md - **2014-02-21** - Added support for IPv6 @@ -47,7 +46,6 @@ At least one config file needs to exist ending with _.config_. A "sample.config. - Config files are sourced relative to the script folder now - **2013-07-12** - First commit diff --git a/nsupdate.d/sample.config.dist b/nsupdate.d/sample.config.dist index f82c58d..1529ab2 100755 --- a/nsupdate.d/sample.config.dist +++ b/nsupdate.d/sample.config.dist @@ -1,25 +1,29 @@ # nsupdate.config -# from which site should we get your wan ip? +# Log file name. +LOG="$0.log" + +# From which site should we get your WAN IP? IP_CHECK_SITE="https://ip.dblx.io" -# use drill instead of nslookup for hostname lookup -USE_DRILL="YES" +# Use drill instead of nslookup for hostname lookup. +USE_DRILL="NO" -# Use IPv6 connection +# Use IPv6 connection. IPV6="NO" -# Update an MX record +# Update an MX record. MX="NO" -# Suppress all messages -SILENT=NO +# Suppress all messages. +SILENT="NO" # Login credentials for the inwx admin interface INWX_USER="USERNAME" -INWX_PASS='PASSWORD' +INWX_PASS="PASSWORD" -# The hostname that you want to update and it's ID from the inwx interface -# You get the ID when you edit the given nameserver entry and hover the save button. +# 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 +# inspecting the target URL of the save button. DOMAIN="DOMAIN" INWX_DOMAIN_ID="123456789"