mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-05 19:07:43 +00:00
cpanel_uapi deploy-hook with root user
cpanel_uapi deploy-hook with root user, first time issue time cannot deploy cert. and give error "Error in deploying certificate - cannot retrieve sitelist" source of error: cpanel asks for username in site list: solution: root user set the username DEPLOY_CPANEL_USER and sitelist command processes the code with this argument test env: 106.0.7 cpanel centos 7 latest acme.sh
This commit is contained in:
parent
ff8de34415
commit
26ab454bfa
@ -79,7 +79,13 @@ cpanel_uapi_deploy() {
|
|||||||
# Auto mode
|
# Auto mode
|
||||||
if [ "$DEPLOY_CPANEL_AUTO_ENABLED" = "true" ]; then
|
if [ "$DEPLOY_CPANEL_AUTO_ENABLED" = "true" ]; then
|
||||||
# call API for site config
|
# call API for site config
|
||||||
_response=$(uapi DomainInfo list_domains)
|
if [ -n "$_uapi_user" ]; then
|
||||||
|
_response=$(uapi --user="$_uapi_user" DomainInfo list_domains)
|
||||||
|
else
|
||||||
|
_response=$(uapi DomainInfo list_domains)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# exit if error in response
|
# exit if error in response
|
||||||
if [ -z "$_response" ] || [ "${_response#*"$uapi_error_response"}" != "$_response" ]; then
|
if [ -z "$_response" ] || [ "${_response#*"$uapi_error_response"}" != "$_response" ]; then
|
||||||
_err "Error in deploying certificate - cannot retrieve sitelist:"
|
_err "Error in deploying certificate - cannot retrieve sitelist:"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user