mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-10 21:42:44 +00:00
freedns: fix domain splitting for multi-part domains
This commit is contained in:
parent
9173140ddf
commit
3862b210bb
@ -47,11 +47,10 @@ dns_freedns_add() {
|
|||||||
_saveaccountconf FREEDNS_COOKIE "$FREEDNS_COOKIE"
|
_saveaccountconf FREEDNS_COOKIE "$FREEDNS_COOKIE"
|
||||||
|
|
||||||
# split our full domain name into two parts...
|
# split our full domain name into two parts...
|
||||||
i="$(echo "$fulldomain" | tr '.' ' ' | wc -w)"
|
# top_domain is everything after the first dot
|
||||||
i="$(_math "$i" - 1)"
|
# sub_domain is the element before the first dot
|
||||||
top_domain="$(echo "$fulldomain" | cut -d. -f "$i"-100)"
|
top_domain="$(echo "$fulldomain" | cut -d. -f 2-)"
|
||||||
i="$(_math "$i" - 1)"
|
sub_domain="$(echo "$fulldomain" | cut -d. -f 1)"
|
||||||
sub_domain="$(echo "$fulldomain" | cut -d. -f -"$i")"
|
|
||||||
|
|
||||||
_debug "top_domain: $top_domain"
|
_debug "top_domain: $top_domain"
|
||||||
_debug "sub_domain: $sub_domain"
|
_debug "sub_domain: $sub_domain"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user