Browse Source

Travis 6

pull/3286/head
Gerardo 5 years ago
committed by GitHub
parent
commit
6930607546
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      dnsapi/dns_aruba.sh

12
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

Loading…
Cancel
Save