GH-25 Getting the Domain-Record-ID via XML-RPC API

Signed-off-by: Eduard Veit <developer@ev21.de>
This commit is contained in:
Eduard Veit
2020-07-03 21:28:27 +02:00
parent cb382a25bf
commit ef034e519c
3 changed files with 169 additions and 32 deletions

View File

@@ -2,37 +2,52 @@
# 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"
# Login credentials for the inwx admin interface
INWX_USER="USERNAME"
INWX_PASS="PASSWORD"
# The domain that you want to update AND its main/zone domain
# The MAIN_DOMAIN is needed for the API-Request to get the record ID
MAIN_DOMAIN="example.com"
DOMAIN="home.example.com"
# If it is the same domain:
#DOMAIN="example.com"
# Set the record type to either A, AAAA or MX
# For MX you would normaly just set a domain and not an ip, so this is just a option.
TYPE="A"
# 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.
USE_DRILL="NO"
# Use IPv6 connection.
IPV6="NO"
# Update an MX record.
MX="NO"
# Suppress all messages and deactivates logging.
SILENT="NO"
# TTL: Time to Live
# default TTL setting by inwx is 3600 (1 hour)
# minimum TTL allowed by inwx is 300 (5 minutes) for regular nameserver record updates
TTL=300
# In this script the defaul setting is 300.
#TTL=300
# Login credentials for the inwx admin interface
INWX_USER="USERNAME"
INWX_PASS="PASSWORD"
# Log file name.
LOG="$0.log"
# The hostname that you want to update and it's ID from the inwx interface.
# Suppress all messages and deactivates logging.
# default is SILENT="NO"
#SILENT="YES"
# Use drill instead of nslookup for hostname lookup.
#USE_DRILL="YES"
# The domain-Record-ID from the inwx interface.
# If the command-line-tool "xmllint" is working you dont need to set this option.
# 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"
#INWX_DOMAIN_ID="123456789"
# Use IPv6 connection.
# deprecated option for backward compatibility, use TYPE instead
#IPV6="NO"
# Update an MX record.
# deprecated option for backward compatibility, use TYPE instead
#MX="NO"