mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-08 09:42:44 +00:00
correctly handle any fulldomain
how is this algorithm for finding the root domain, it can handle "example.com.br"
This commit is contained in:
parent
41ba9b15ca
commit
bc14e2ba4a
@ -20,8 +20,15 @@
|
|||||||
# Used to add txt record
|
# Used to add txt record
|
||||||
dns_acmedns_add() {
|
dns_acmedns_add() {
|
||||||
fulldomain=$1
|
fulldomain=$1
|
||||||
i=2
|
i=1
|
||||||
d=$(printf "%s" "$fulldomain" | cut -d . -f $i-100)
|
while [ -z "$d" ]; do
|
||||||
|
_d=$(printf "%s" "$fulldomain" | cut -d . -f $i-100)
|
||||||
|
c=$(echo $_d | awk -F'.' '{ print NF }')
|
||||||
|
if [[ $c < 4 && ( $(echo $_d | cut -d . -f 2) = "com" || $(echo $_d | cut -d . -f 3) = "" ) ]]; then
|
||||||
|
d=$_d
|
||||||
|
fi
|
||||||
|
i=$(_math "$i" + 1)
|
||||||
|
done
|
||||||
h="${d/./_}"
|
h="${d/./_}"
|
||||||
txtvalue=$2
|
txtvalue=$2
|
||||||
_info "Using acme-dns"
|
_info "Using acme-dns"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user