There is an obvious bug here:
if we want to update example.com.example.com in zone example.com,
so `
[email protected]`, after parsing,
the `__HOST` will be `example.com`, not expected `example.com.example.com`.
Signed-off-by: Liangbin Lian <[email protected]>
PKG_NAME:=ddns-scripts
PKG_VERSION:=2.8.2
-PKG_RELEASE:=70
+PKG_RELEASE:=71
PKG_LICENSE:=GPL-2.0
# __HOST = the FQDN of record to modify
# i.e. example.com for the "domain record" or host.sub.example.com for "host record"
+if [ -z "$__HOST" ]; then
# handling domain record then set __HOST = __DOMAIN
-[ -z "$__HOST" ] && __HOST=$__DOMAIN
+ __HOST=$__DOMAIN
+else
-[ "$__HOST" != "$__DOMAIN" ] && __HOST="${__HOST}.${__DOMAIN}"
+ __HOST="${__HOST}.${__DOMAIN}"
+fi
# set record type
[ $use_ipv6 -eq 0 ] && __TYPE="A" || __TYPE="AAAA"