Skip to content

Commit 58e58d3

Browse files
committed
Vultr DNS: fix "grep: repetition-operator operand invalid" on FreeBSD
1 parent eb27013 commit 58e58d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dnsapi/dns_vultr.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ dns_vultr_rm() {
7878
return 1
7979
fi
8080

81-
_record_id="$(echo "$response" | tr '{}' '\n' | grep '"TXT"' | grep -- "$txtvalue" | tr ',' '\n' | grep -i 'id' | cut -d : -f 2)"
81+
_record_id="$(echo "$response" | tr '{}' '\n' | grep '"TXT"' | grep -- "$txtvalue" | tr ',' '\n' | grep -i 'id' | cut -d : -f 2 | tr -d '"')"
8282
_debug _record_id "$_record_id"
8383
if [ "$_record_id" ]; then
8484
_info "Successfully retrieved the record id for ACME challenge."
@@ -116,7 +116,7 @@ _get_root() {
116116
return 1
117117
fi
118118

119-
if printf "%s\n" "$response" | grep '^\{.*\}' >/dev/null; then
119+
if printf "%s\n" "$response" | grep -E '^\{.*\}' >/dev/null; then
120120
if _contains "$response" "\"domain\":\"$_domain\""; then
121121
_sub_domain="$(echo "$fulldomain" | sed "s/\\.$_domain\$//")"
122122
return 0

0 commit comments

Comments
 (0)