From 36d5be15c89fd02541c02110d4046a22a8baa852 Mon Sep 17 00:00:00 2001 From: Anthony Date: Tue, 21 Oct 2025 01:54:41 +0800 Subject: [PATCH] Fix SSL cert on phpMyadmin --- mbadmin.jps | 2 +- scripts/pma-gateway/create_pma_gateway.sh | 24 ++++++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/mbadmin.jps b/mbadmin.jps index 7b618d4..d78f008 100644 --- a/mbadmin.jps +++ b/mbadmin.jps @@ -1029,7 +1029,7 @@ actions: user: root commands: - bash /home/litespeed/mbmanager/scripts/dbreset.sh >/dev/null - - bash /home/litespeed/mbmanager/pma-gateway/create_pma_gateway.sh --validity="${settings.validity}" --slug="${settings.slug}" | tail -n1 + - bash /home/litespeed/mbmanager/pma-gateway/create_pma_gateway.sh --validity="${settings.validity}" --slug="${settings.slug}" - return: type: info message: "Gateway URL: ${response.out}" diff --git a/scripts/pma-gateway/create_pma_gateway.sh b/scripts/pma-gateway/create_pma_gateway.sh index b306204..8c7c4ff 100644 --- a/scripts/pma-gateway/create_pma_gateway.sh +++ b/scripts/pma-gateway/create_pma_gateway.sh @@ -314,10 +314,28 @@ fi # Generate URL using public hostname (port 443) with valid SSL certificate # This bypasses CDN protections and uses the trusted certificate URL="https://$PUBLIC_HOST/access-db-$SLUG.php?token=$token" -echo "$URL" -# Display security information -echo "" +# Output JSON response for Cloud Scripting compatibility +# Cloud Scripting expects structured JSON output from custom actions +cat <&2 echo " • Gateway URL uses valid Let's Encrypt certificate" >&2 echo " • Served through main domain (port 443) with CDN protection" >&2