Browse Source
Merge pull request #4266 from skyksandr/master
Vultr DNS: fix "grep: repetition-operator operand invalid" on FreeBSD
pull/4489/head
neil
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
dnsapi/dns_vultr.sh
|
@ -78,7 +78,7 @@ dns_vultr_rm() { |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
_record_id="$(echo "$response" | tr '{}' '\n' | grep '"TXT"' | grep -- "$txtvalue" | tr ',' '\n' | grep -i 'id' | cut -d : -f 2)" |
|
|
|
|
|
|
|
|
_record_id="$(echo "$response" | tr '{}' '\n' | grep '"TXT"' | grep -- "$txtvalue" | tr ',' '\n' | grep -i 'id' | cut -d : -f 2 | tr -d '"')" |
|
|
_debug _record_id "$_record_id" |
|
|
_debug _record_id "$_record_id" |
|
|
if [ "$_record_id" ]; then |
|
|
if [ "$_record_id" ]; then |
|
|
_info "Successfully retrieved the record id for ACME challenge." |
|
|
_info "Successfully retrieved the record id for ACME challenge." |
|
@ -116,7 +116,7 @@ _get_root() { |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if printf "%s\n" "$response" | grep '^\{.*\}' >/dev/null; then |
|
|
|
|
|
|
|
|
if printf "%s\n" "$response" | grep -E '^\{.*\}' >/dev/null; then |
|
|
if _contains "$response" "\"domain\":\"$_domain\""; then |
|
|
if _contains "$response" "\"domain\":\"$_domain\""; then |
|
|
_sub_domain="$(echo "$fulldomain" | sed "s/\\.$_domain\$//")" |
|
|
_sub_domain="$(echo "$fulldomain" | sed "s/\\.$_domain\$//")" |
|
|
return 0 |
|
|
return 0 |
|
|