mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-09 16:01:46 +00:00
Fixes response handling and thereby allow issuing of subdomain certs
This commit is contained in:
parent
a290f63a15
commit
b0f5ad75ae
@ -6,7 +6,7 @@
|
|||||||
#SIMPLY_ApiKey="apikey"
|
#SIMPLY_ApiKey="apikey"
|
||||||
#
|
#
|
||||||
#SIMPLY_Api="https://api.simply.com/1/[ACCOUNTNAME]/[APIKEY]"
|
#SIMPLY_Api="https://api.simply.com/1/[ACCOUNTNAME]/[APIKEY]"
|
||||||
|
SIMPLY_SUCCESS_CODE='"status": 200'
|
||||||
SIMPLY_Api_Default="https://api.simply.com/1"
|
SIMPLY_Api_Default="https://api.simply.com/1"
|
||||||
|
|
||||||
######## Public functions #####################
|
######## Public functions #####################
|
||||||
@ -171,7 +171,7 @@ _get_root() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if _contains "$response" '"code":"NOT_FOUND"'; then
|
if ! _contains "$response" "$SIMPLY_SUCCESS_CODE"; then
|
||||||
_debug "$h not found"
|
_debug "$h not found"
|
||||||
else
|
else
|
||||||
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
|
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
|
||||||
@ -196,6 +196,12 @@ _simply_add_record() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! _contains "$response" "$SIMPLY_SUCCESS_CODE"; then
|
||||||
|
_err "Call to API not sucessfull, see below message for more details"
|
||||||
|
_err "$response"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,6 +217,12 @@ _simply_delete_record() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! _contains "$response" "$SIMPLY_SUCCESS_CODE"; then
|
||||||
|
_err "Call to API not sucessfull, see below message for more details"
|
||||||
|
_err "$response"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user