From 47b2e1b8e1fe0c1bc29eae5f7940d672aa68b195 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sat, 24 Jan 2026 15:31:58 +0100 Subject: [PATCH] fix(luci-app-haproxy): Correct container name in RPCD backend Change container references from 'haproxy-lxc' to 'haproxy' to match the actual container name used by secubox-app-haproxy. This fixes the LuCI status view showing container_running: false. Fixes affected methods: - method_status: container existence and state checks - method_get_stats: container running check Co-Authored-By: Claude Opus 4.5 --- .../luci-app-haproxy/root/usr/libexec/rpcd/luci.haproxy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/secubox/luci-app-haproxy/root/usr/libexec/rpcd/luci.haproxy b/package/secubox/luci-app-haproxy/root/usr/libexec/rpcd/luci.haproxy index fddb77fc..b7a03e0b 100644 --- a/package/secubox/luci-app-haproxy/root/usr/libexec/rpcd/luci.haproxy +++ b/package/secubox/luci-app-haproxy/root/usr/libexec/rpcd/luci.haproxy @@ -55,15 +55,15 @@ method_status() { stats_enabled=$(get_uci main stats_enabled 1) # Check container status - if lxc-info -n haproxy-lxc >/dev/null 2>&1; then - container_running=$(lxc-info -n haproxy-lxc -s 2>/dev/null | grep -q "RUNNING" && echo "1" || echo "0") + if lxc-info -n haproxy >/dev/null 2>&1; then + container_running=$(lxc-info -n haproxy -s 2>/dev/null | grep -q "RUNNING" && echo "1" || echo "0") else container_running="0" fi # Check HAProxy process in container if [ "$container_running" = "1" ]; then - haproxy_running=$(lxc-attach -n haproxy-lxc -- pgrep haproxy >/dev/null 2>&1 && echo "1" || echo "0") + haproxy_running=$(lxc-attach -n haproxy -- pgrep haproxy >/dev/null 2>&1 && echo "1" || echo "0") else haproxy_running="0" fi @@ -83,7 +83,7 @@ method_status() { method_get_stats() { local stats_output - if lxc-info -n haproxy-lxc -s 2>/dev/null | grep -q "RUNNING"; then + if lxc-info -n haproxy -s 2>/dev/null | grep -q "RUNNING"; then # Get stats via HAProxy socket stats_output=$(run_ctl stats 2>/dev/null) if [ -n "$stats_output" ]; then