Skip to content

Commit

Permalink
Merge pull request #22 from EV21/GH-21
Browse files Browse the repository at this point in the history
GH-21 fixing API-XML syntax and add some documentation
  • Loading branch information
chrisb86 committed Dec 21, 2019
2 parents f756536 + fafbdd1 commit 5df1209
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.config
!dist.config.sample
nsupdate.sh.log
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"
12 changes: 12 additions & 0 deletions nsupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then
<string>$INWX_USER</string>
</value>
</member>
<member>
<name>lang</name>
<value>
<string>en</string>
</value>
</member>
<member>
<name>pass</name>
<value>
Expand All @@ -109,6 +115,12 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then
<string>$WAN_IP</string>
</value>
</member>
<member>
<name>ttl</name>
<value>
<int>300</int>
</value>
</member>
</struct>
</value>
</param>
Expand Down

0 comments on commit 5df1209

Please sign in to comment.