mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-01 11:12:43 +00:00
fixing shfmt issue
This commit is contained in:
parent
0e93aa3cea
commit
8ac5ae7e56
@ -71,7 +71,7 @@ cloudhub_v2_deploy() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set Anypoint Platform URL
|
# Set Anypoint Platform URL
|
||||||
if [ -z "$ANYPOINT_URL" ]; then
|
if [ -z "$ANYPOINT_URL" ]; then
|
||||||
_debug "ANYPOINT_URL Not set, using default https://anypoint.mulesoft.com"
|
_debug "ANYPOINT_URL Not set, using default https://anypoint.mulesoft.com"
|
||||||
ANYPOINT_URL="https://anypoint.mulesoft.com"
|
ANYPOINT_URL="https://anypoint.mulesoft.com"
|
||||||
@ -147,26 +147,26 @@ _get_tls_context_id() {
|
|||||||
|
|
||||||
# Get Tls-Context
|
# Get Tls-Context
|
||||||
tls_context_response="$(_cloudhub_rest "GET" "/runtimefabric/api/organizations/$ORGANIZATION_ID/privatespaces/$CH2_PRIVATE_SPACE_ID/tlsContexts" | _normalizeJson)"
|
tls_context_response="$(_cloudhub_rest "GET" "/runtimefabric/api/organizations/$ORGANIZATION_ID/privatespaces/$CH2_PRIVATE_SPACE_ID/tlsContexts" | _normalizeJson)"
|
||||||
_ret="$?"
|
_ret="$?"
|
||||||
|
|
||||||
if [ "$_ret" != 0 ]; then
|
if [ "$_ret" != 0 ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if _contains "$tls_context_response" "\"name\":\"$_domain\"" >/dev/null; then
|
if _contains "$tls_context_response" "\"name\":\"$_domain\"" >/dev/null; then
|
||||||
tlscontext_list=$(echo "$tls_context_response" | _egrep_o "\"id\":\".*\",\"name\":\"$_domain\"")
|
tlscontext_list=$(echo "$tls_context_response" | _egrep_o "\"id\":\".*\",\"name\":\"$_domain\"")
|
||||||
|
|
||||||
if [ "$tlscontext_list" ]; then
|
if [ "$tlscontext_list" ]; then
|
||||||
regex_id=".*\"id\":\"\([-._0-9A-Za-z]*\)\".*$"
|
regex_id=".*\"id\":\"\([-._0-9A-Za-z]*\)\".*$"
|
||||||
tls_context_id=$(echo "$tlscontext_list" | sed -n "s/$regex_id/\1/p")
|
tls_context_id=$(echo "$tlscontext_list" | sed -n "s/$regex_id/\1/p")
|
||||||
if [ "$tls_context_id" ]; then
|
if [ "$tls_context_id" ]; then
|
||||||
_debug "TLS-Context id: $tls_context_id found! The script will update it."
|
_debug "TLS-Context id: $tls_context_id found! The script will update it."
|
||||||
printf "%s" "$tls_context_id"
|
printf "%s" "$tls_context_id"
|
||||||
return 0
|
return 0
|
||||||
fi
|
|
||||||
_err "Can't extract TLS-Context id from: $tlscontext_list"
|
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
|
_err "Can't extract TLS-Context id from: $tlscontext_list"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -193,7 +193,7 @@ _cloudhub_rest() {
|
|||||||
_debug response "$response"
|
_debug response "$response"
|
||||||
_debug _ret "$_ret"
|
_debug _ret "$_ret"
|
||||||
|
|
||||||
if [ "$_ret" = "0" ] && { [ "$http_code" -ge 200 ] && [ "$http_code" -le 299 ];}; then
|
if [ "$_ret" = "0" ] && { [ "$http_code" -ge 200 ] && [ "$http_code" -le 299 ]; }; then
|
||||||
printf "%s" "$response"
|
printf "%s" "$response"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user