Commit acf11758 authored by Santeri Kannisto's avatar Santeri Kannisto Committed by GitHub
Browse files

#1042

Apparently UAPI does not return any error code, just JSON output that has a string "status: 0" whenever the command fails.
parent 7b4bbed5
......@@ -51,8 +51,8 @@ cpanel_uapi_deploy() {
else
_response=$(uapi SSL install_ssl domain="$_cdomain" cert="$_cert" key="$_key")
fi
if [ $? -ne 0 ]; then
error_response="status: 0"
if test "${_response#*$error_response}" != "$_response"; then
_err "Error in deploying certificate:"
_err "$_response"
return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment