fixing API-XML syntax and add some documentation
This commit is contained in:
parent
f756536755
commit
fafbdd172f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
*.config
|
*.config
|
||||||
|
!dist.config.sample
|
||||||
nsupdate.sh.log
|
nsupdate.sh.log
|
||||||
|
12
README.md
12
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`.
|
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
|
## Changelog
|
||||||
|
|
||||||
|
**2019-12-20**
|
||||||
|
|
||||||
|
- Fixing API-XML syntax
|
||||||
|
- Added some more documentation
|
||||||
|
|
||||||
**2015-07-22**
|
**2015-07-22**
|
||||||
|
|
||||||
- Changed the way how the existence of config files is checked
|
- Changed the way how the existence of config files is checked
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
# nsupdate.config
|
# 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 file name.
|
||||||
LOG="$0.log"
|
LOG="$0.log"
|
||||||
|
|
||||||
# From which site should we get your WAN IP?
|
# 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/"
|
IP_CHECK_SITE="https://api.ipify.org/"
|
||||||
|
|
||||||
# Use drill instead of nslookup for hostname lookup.
|
# Use drill instead of nslookup for hostname lookup.
|
||||||
@ -23,7 +27,7 @@ INWX_USER="USERNAME"
|
|||||||
INWX_PASS="PASSWORD"
|
INWX_PASS="PASSWORD"
|
||||||
|
|
||||||
# The hostname that you want to update and it's ID from the inwx interface.
|
# 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.
|
# inspecting the target URL of the save button.
|
||||||
DOMAIN="DOMAIN"
|
DOMAIN="DOMAIN"
|
||||||
INWX_DOMAIN_ID="123456789"
|
INWX_DOMAIN_ID="123456789"
|
12
nsupdate.sh
12
nsupdate.sh
@ -91,6 +91,12 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then
|
|||||||
<string>$INWX_USER</string>
|
<string>$INWX_USER</string>
|
||||||
</value>
|
</value>
|
||||||
</member>
|
</member>
|
||||||
|
<member>
|
||||||
|
<name>lang</name>
|
||||||
|
<value>
|
||||||
|
<string>en</string>
|
||||||
|
</value>
|
||||||
|
</member>
|
||||||
<member>
|
<member>
|
||||||
<name>pass</name>
|
<name>pass</name>
|
||||||
<value>
|
<value>
|
||||||
@ -109,6 +115,12 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then
|
|||||||
<string>$WAN_IP</string>
|
<string>$WAN_IP</string>
|
||||||
</value>
|
</value>
|
||||||
</member>
|
</member>
|
||||||
|
<member>
|
||||||
|
<name>ttl</name>
|
||||||
|
<value>
|
||||||
|
<int>300</int>
|
||||||
|
</value>
|
||||||
|
</member>
|
||||||
</struct>
|
</struct>
|
||||||
</value>
|
</value>
|
||||||
</param>
|
</param>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user