From a1c5f07f876d3d59d5ad3681e6a82c9e667195b4 Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 28 Feb 2026 15:20:55 +0800 Subject: [PATCH] Fix Bash syntax error in disable_opcache JPS action - simplify error detection --- mbadmin.jps | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/mbadmin.jps b/mbadmin.jps index 491a884..a7e5118 100644 --- a/mbadmin.jps +++ b/mbadmin.jps @@ -655,20 +655,11 @@ actions: commands: - | set -euo pipefail - TMP_OUTPUT="$(mktemp)" - cleanup() { - rm -f "${TMP_OUTPUT}" - } - trap cleanup EXIT - - php /home/litespeed/mbmanager/scripts/toggle_opcache.php disable > "${TMP_OUTPUT}" - - if grep -Eq '"status"[[:space:]]*:[[:space:]]*"error"' "${TMP_OUTPUT}"; then - cat "${TMP_OUTPUT}" + OUTPUT=$(php /home/litespeed/mbmanager/scripts/toggle_opcache.php disable 2>&1) + echo "$OUTPUT" + if echo "$OUTPUT" | grep -q '"status".*:.*"error"'; then exit 1 fi - - cat "${TMP_OUTPUT}" - restartNodes: - nodeGroup: "cp" reboot: true