From 69306075464dc8cafa3a802c91b807432f2fc8f7 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Sun, 19 Apr 2020 17:13:52 +0200 Subject: [PATCH] Travis 6 --- dnsapi/dns_aruba.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dnsapi/dns_aruba.sh b/dnsapi/dns_aruba.sh index ec8e7448..ce7621b8 100644 --- a/dnsapi/dns_aruba.sh +++ b/dnsapi/dns_aruba.sh @@ -89,11 +89,11 @@ _initAuth() { _err "Please retry to create a new one." _clearaccountconf ARUBA_CK return 1 - fi + fi domainData=$(echo "$response" | tr -d '\r') # get all Ids and peek only values temp="$(echo "$domainData" | _egrep_o "Id\": [^,]*" | cut -d : -f 2 | head -1)" # first element is zone Id - domain_id=$temp + domain_id=$temp _info "DomainId is: $domain_id" _info "Consumer key is ok." return 0 @@ -110,8 +110,7 @@ dns_aruba_add() { return 1 fi _debug _domain "$_domain" - _sub_domain="_acme-challenge" - + _sub_domain="_acme-challenge" _debug "Check if _acme-challenge record exists in " "$_domain" if ! _extract_record_id "$_sub_domain.$_domain."; then _method="POST" @@ -160,13 +159,12 @@ dns_aruba_rm() { # returns TXT record and put it in_record_id, if esists _extract_record_id() { subdomain="$1" - _arrayid=0 _ids="$(echo "$domainData" | _egrep_o '"Id": [^,]+' | cut -d : -f 2)" - _debug $ids + _debug "$_ids" #_temp="$(echo $domainData | grep -oP "\"DomainId\":\s\d{1,}," | tr -d ' ')" #_domainids="$(echo $_temp | tr -d ' ')" _names="$(echo "$domainData" | _egrep_o '"Name": [^,]*' | cut -d : -f 2)" - _debug $names + _debug "$_names" ARRAY_IDS=$(echo "$_ids" | tr ", " "\n") ARRAY_NAMES=$_names j=0