mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-08 13:47:01 +00:00
Travis 4
This commit is contained in:
parent
680106582b
commit
51668042e9
@ -111,7 +111,7 @@ dns_aruba_add() {
|
|||||||
if ! _initAuth; then
|
if ! _initAuth; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_debug _domain "$_domain"
|
_debug _domain "$_domain"
|
||||||
_sub_domain="_acme-challenge"
|
_sub_domain="_acme-challenge"
|
||||||
|
|
||||||
@ -122,7 +122,6 @@ dns_aruba_add() {
|
|||||||
_method="PUT"
|
_method="PUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
_payload="{ \"IdDomain\": $domain_id, \"Type\": \"TXT\", \"Name\": \"$_sub_domain\", \"Content\": \"\\\"$txtvalue\\\"\" }"
|
_payload="{ \"IdDomain\": $domain_id, \"Type\": \"TXT\", \"Name\": \"$_sub_domain\", \"Content\": \"\\\"$txtvalue\\\"\" }"
|
||||||
|
|
||||||
_info "Adding record"
|
_info "Adding record"
|
||||||
@ -149,7 +148,6 @@ dns_aruba_rm() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
_sub_domain="_acme-challenge"
|
_sub_domain="_acme-challenge"
|
||||||
|
|
||||||
_debug "Getting TXT record to delete: $_sub_domain.$_domain."
|
_debug "Getting TXT record to delete: $_sub_domain.$_domain."
|
||||||
|
|
||||||
if ! _extract_record_id "$_sub_domain.$_domain"; then
|
if ! _extract_record_id "$_sub_domain.$_domain"; then
|
||||||
@ -178,7 +176,7 @@ _extract_record_id() {
|
|||||||
_debug $names
|
_debug $names
|
||||||
ARRAY_IDS=$(echo "$_ids" | tr ", " "\n")
|
ARRAY_IDS=$(echo "$_ids" | tr ", " "\n")
|
||||||
ARRAY_NAMES=$_names
|
ARRAY_NAMES=$_names
|
||||||
|
|
||||||
j=0
|
j=0
|
||||||
for i in $ARRAY_NAMES; do
|
for i in $ARRAY_NAMES; do
|
||||||
if [ "$i" = "$subdomain" ]; then
|
if [ "$i" = "$subdomain" ]; then
|
||||||
@ -189,7 +187,7 @@ _extract_record_id() {
|
|||||||
fi
|
fi
|
||||||
j=$(_math "$j" + 1)
|
j=$(_math "$j" + 1)
|
||||||
done
|
done
|
||||||
|
|
||||||
n=0
|
n=0
|
||||||
for i in $ARRAY_IDS; do
|
for i in $ARRAY_IDS; do
|
||||||
if [ "$n" = "$_arrayId" ]; then
|
if [ "$n" = "$_arrayId" ]; then
|
||||||
@ -199,11 +197,9 @@ _extract_record_id() {
|
|||||||
fi
|
fi
|
||||||
n=$(_math "$n" + 1)
|
n=$(_math "$n" + 1)
|
||||||
done
|
done
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_aruba_authentication() {
|
_aruba_authentication() {
|
||||||
export _H1="Content-Type: application/x-www-form-urlencoded"
|
export _H1="Content-Type: application/x-www-form-urlencoded"
|
||||||
export _H2="Authorization-Key: $ARUBA_TK"
|
export _H2="Authorization-Key: $ARUBA_TK"
|
||||||
@ -225,11 +221,9 @@ _aruba_authentication() {
|
|||||||
|
|
||||||
ARUBA_CK="$access_token"
|
ARUBA_CK="$access_token"
|
||||||
_saveaccountconf ARUBA_CK "$ARUBA_CK"
|
_saveaccountconf ARUBA_CK "$ARUBA_CK"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_aruba_rest() {
|
_aruba_rest() {
|
||||||
m=$1
|
m=$1
|
||||||
ep="$2"
|
ep="$2"
|
||||||
@ -244,7 +238,6 @@ _aruba_rest() {
|
|||||||
export _H3="Authorization: Bearer $ARUBA_CK"
|
export _H3="Authorization: Bearer $ARUBA_CK"
|
||||||
export _H4="Authorization-Key: $ARUBA_TK"
|
export _H4="Authorization-Key: $ARUBA_TK"
|
||||||
export _H5="Accept: application/json"
|
export _H5="Accept: application/json"
|
||||||
|
|
||||||
_debug2 _H3 "$_H3"
|
_debug2 _H3 "$_H3"
|
||||||
_debug2 _H4 "$_H4"
|
_debug2 _H4 "$_H4"
|
||||||
if [ "$data" ] || [ "$m" = "POST" ] || [ "$m" = "PUT" ] || [ "$m" = "DELETE" ]; then
|
if [ "$data" ] || [ "$m" = "POST" ] || [ "$m" = "PUT" ] || [ "$m" = "DELETE" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user