This commit is contained in:
Liangbin Lian 2024-04-18 15:35:07 +03:00 committed by GitHub
commit 612cf2d114
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ddns-scripts
PKG_VERSION:=2.8.2
PKG_RELEASE:=43
PKG_RELEASE:=44
PKG_LICENSE:=GPL-2.0

View File

@ -43,10 +43,13 @@ __DOMAIN=$(printf %s "$domain" | cut -d@ -f2)
# __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
# handling host record then rebuild fqdn host@domain.tld => host.domain.tld
[ "$__HOST" != "$__DOMAIN" ] && __HOST="${__HOST}.${__DOMAIN}"
__HOST="${__HOST}.${__DOMAIN}"
fi
# set record type
[ $use_ipv6 -eq 0 ] && __TYPE="A" || __TYPE="AAAA"