mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 13:11:41 +00:00
remove fgrep, escape regex chars instead
This commit is contained in:
parent
88ed5e506a
commit
0d4035e996
@ -67,7 +67,7 @@ _dns_do_list_rrs() {
|
|||||||
_rr_list="$(echo "${response}" \
|
_rr_list="$(echo "${response}" \
|
||||||
| tr -d "\n\r\t" \
|
| tr -d "\n\r\t" \
|
||||||
| sed -e 's/<item xsi:type="ns2:Map">/\n/g' \
|
| sed -e 's/<item xsi:type="ns2:Map">/\n/g' \
|
||||||
| fgrep ">${fulldomain}</value>" \
|
| grep ">$(_regexcape "$fulldomain")</value>" \
|
||||||
| sed -e 's/<\/item>/\n/g' \
|
| sed -e 's/<\/item>/\n/g' \
|
||||||
| grep '>id</key><value' \
|
| grep '>id</key><value' \
|
||||||
| _egrep_o '>[0-9]{1,16}<' \
|
| _egrep_o '>[0-9]{1,16}<' \
|
||||||
@ -127,7 +127,7 @@ _get_root() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if fgrep -q "$h" "${_all_domains}"; then
|
if grep -q "$(_regexcape "$h")" "${_all_domains}"; then
|
||||||
_domain="$h"
|
_domain="$h"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -138,3 +138,7 @@ _get_root() {
|
|||||||
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_regexcape() {
|
||||||
|
echo "$1" | sed -e 's/\([]\.$*^[]\)/\\\1/g'
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user