mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
ddns-scripts: fix parsing of parameters for cloudflare.com
Compatible with domain without the `@` symbol, consistent with the previous.
Fixes 8c55d089 ("ddns-scripts: fix parsing of parameters for cloudflare.com")
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
This commit is contained in:
committed by
Florian Eckert
parent
f71550540e
commit
150d88585b
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ddns-scripts
|
||||
PKG_VERSION:=2.8.2
|
||||
PKG_RELEASE:=71
|
||||
PKG_RELEASE:=72
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
|
||||
@@ -30,12 +30,16 @@
|
||||
local __HOST __DOMAIN __TYPE __URLBASE __PRGBASE __RUNPROG __DATA __IPV6 __ZONEID __RECID
|
||||
local __URLBASE="https://api.cloudflare.com/client/v4"
|
||||
|
||||
if echo "$domain" | grep -Fq '@'; then
|
||||
# split __HOST __DOMAIN from $domain
|
||||
# given data:
|
||||
# @example.com for "domain record"
|
||||
# host.sub@example.com for a "host record"
|
||||
__HOST=$(printf %s "$domain" | cut -d@ -f1)
|
||||
__DOMAIN=$(printf %s "$domain" | cut -d@ -f2)
|
||||
else
|
||||
__DOMAIN=$domain
|
||||
fi
|
||||
|
||||
# Cloudflare v4 needs:
|
||||
# __DOMAIN = the base domain i.e. example.com
|
||||
|
||||
Reference in New Issue
Block a user