mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-10 09:22:47 +00:00
Updated ID retrieval from response
Tested calls with a response string and it was not extracting the ID.
Used @wilddom's fork ID parsing and it works.
Did not include get_root again as he did ($_domain_name comes with appropriate string).
His fork: 931f93c5bb
Only thing I wanted now was to disable/fix the `get_root` so it does not use the main domain when it fails on a subdomain.
For example, if it fails on sub.domain.com it will try with domain.com and since I have both on Dynu, I don't really want that (I want it to just fail and then try again later).
I guess I will open an issue for that...
This commit is contained in:
parent
56af0e2c52
commit
1b25c70fc5
@ -161,7 +161,7 @@ _get_recordid() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
_dns_record_id=$(printf "%s" "$response" | _egrep_o "{[^}]*}" | grep "\"text_data\":\"$txtvalue\"" | _egrep_o ",[^,]*," | grep ',"id":' | tr -d ",," | cut -d : -f 2)
|
||||
_dns_record_id=$(printf "%s" "$response" | sed -e 's/[^{]*\({[^}]*}\)[^{]*/\1\n/g' | grep "\"text_data\":\"$txtvalue\"" | sed -e 's/.*"id":\([^,]*\).*/\1/')
|
||||
|
||||
return 0
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user