mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-05 23:17:41 +00:00
Remove use of rev command... new method of separating top domain from subdomain.
This commit is contained in:
parent
0cac509626
commit
d280e4ad6d
@ -44,6 +44,13 @@ dns_freedns_add() {
|
||||
|
||||
_saveaccountconf FREEDNS_COOKIE "$FREEDNS_COOKIE"
|
||||
|
||||
# split our full domain name into two parts...
|
||||
i="$(echo "$fulldomain" | tr '.' ' ' | wc -w)"
|
||||
i="$(_math "$i" - 1)"
|
||||
top_domain="$(echo "$fulldomain" | cut -d. -f "$i"-100)"
|
||||
i="$(_math "$i" - 1)"
|
||||
sub_domain="$(echo "$fulldomain" | cut -d. -f -"$i")"
|
||||
|
||||
htmlpage="$(_freedns_retrieve_subdomain_page "$FREEDNS_COOKIE")"
|
||||
if [ "$?" != "0" ]; then
|
||||
if [ "$using_cached_cookies" = "true" ]; then
|
||||
@ -53,10 +60,6 @@ dns_freedns_add() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# split our full domain name into two parts...
|
||||
top_domain="$(echo "$fulldomain" | rev | cut -d. -f -2 | rev)"
|
||||
sub_domain="$(echo "$fulldomain" | rev | cut -d. -f 3- | rev)"
|
||||
|
||||
# Now convert the tables in the HTML to CSV. This litte gem from
|
||||
# http://stackoverflow.com/questions/1403087/how-can-i-convert-an-html-table-to-csv
|
||||
subdomain_csv="$(echo "$htmlpage" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user