From 58076b16c03e9bcc2ebdba1727d2e8dd11f14b16 Mon Sep 17 00:00:00 2001 From: SamNet-dev Date: Mon, 16 Feb 2026 14:19:23 -0600 Subject: [PATCH] fix: detect 3x-ui panel xray process on GFK install pgrep -x xray-linux-amd64 never matched because the Linux kernel truncates process names to 15 chars (TASK_COMM_LEN), so the actual process name is "xray-linux-amd6". This caused panel detection to fail on 3x-ui servers, leading to config overwrite and port conflict. Fix: use pgrep -f "xray-linux" which matches the full command line. --- paqctl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paqctl.sh b/paqctl.sh index 0efad53..f46bd92 100644 --- a/paqctl.sh +++ b/paqctl.sh @@ -1575,7 +1575,7 @@ setup_xray_for_gfk() { local target_port target_port=$(echo "${GFK_PORT_MAPPINGS:-14000:443}" | cut -d: -f2 | cut -d, -f1) - if pgrep -x xray &>/dev/null || pgrep -x xray-linux-amd64 &>/dev/null; then + if pgrep -x xray &>/dev/null || pgrep -f "xray-linux" &>/dev/null; then # Check if this is paqctl's own standalone Xray (not a real panel) if _is_paqctl_standalone_xray; then log_info "Existing Xray is paqctl's standalone install — reconfiguring..." @@ -6242,7 +6242,7 @@ setup_xray_for_gfk() { local target_port target_port=$(echo "${GFK_PORT_MAPPINGS:-14000:443}" | cut -d: -f2 | cut -d, -f1) - if pgrep -x xray &>/dev/null || pgrep -x xray-linux-amd64 &>/dev/null; then + if pgrep -x xray &>/dev/null || pgrep -f "xray-linux" &>/dev/null; then # Check if this is paqctl's own standalone Xray (not a real panel) if _is_paqctl_standalone_xray; then log_info "Existing Xray is paqctl's standalone install — reconfiguring..."