Skip to content

Commit

Permalink
Update dns_limacity.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
laraveluser authored Mar 3, 2024
1 parent 9e073c9 commit d3b022f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dnsapi/dns_limacity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ _lima_get_domain_id() {
p=1

domains=$(_get "${APIBASE}/domains.json")
if [ "$(echo "$domains" | _egrep_o "{.*\"domains\"")" ]; then
if [ "$(echo "$domains" | _egrep_o "\{.*""domains""")" ]; then
response="$(echo "$domains" | tr -d "\n" | tr '{' "|" | sed 's/|/&{/g' | tr "|" "\n")"
while true; do
h=$(printf "%s" "$domain" | cut -d . -f $i-100)
Expand All @@ -76,7 +76,7 @@ _lima_get_domain_id() {
return 1
fi

hostedzone="$(echo "$response" | _egrep_o "{.*\"unicode_fqdn\":\s*\"$h\".*}")"
hostedzone="$(echo "$response" | _egrep_o "\{.*""unicode_fqdn""[^,]+""$h"".*\}")"
if [ "$hostedzone" ]; then
LIMACITY_DOMAINID=$(printf "%s\n" "$hostedzone" | _egrep_o "\"id\":\s*[0-9]+" | _head_n 1 | cut -d : -f 2 | tr -d \ )
if [ "$LIMACITY_DOMAINID" ]; then
Expand Down

0 comments on commit d3b022f

Please sign in to comment.