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.
This commit is contained in:
SamNet-dev
2026-02-16 14:19:23 -06:00
parent 361235daca
commit 58076b16c0

View File

@@ -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..."