From 7d257cd35fcdc94c5681bae68b55df51688f9ab8 Mon Sep 17 00:00:00 2001 From: Developer Date: Tue, 2 Dec 2025 01:28:17 -0800 Subject: [PATCH] fix(tproxy): detect clash process with any name (clash-linux-amd64, etc.) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/mpc-system/scripts/tproxy.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/mpc-system/scripts/tproxy.sh b/backend/mpc-system/scripts/tproxy.sh index 30dec13f..c3597eda 100644 --- a/backend/mpc-system/scripts/tproxy.sh +++ b/backend/mpc-system/scripts/tproxy.sh @@ -60,7 +60,8 @@ check_root() { } check_clash() { - if ! pgrep -x "clash" > /dev/null 2>&1; then + # Check for any clash process (clash, clash-linux-amd64, etc.) + if ! pgrep -f "clash" > /dev/null 2>&1; then log_error "Clash is not running" log_info "Please start Clash first" exit 1 @@ -192,9 +193,9 @@ show_status() { # Check Clash echo "Clash Process:" - if pgrep -x "clash" > /dev/null 2>&1; then + if pgrep -f "clash" > /dev/null 2>&1; then echo -e " Status: ${GREEN}Running${NC}" - echo " PID: $(pgrep -x clash)" + echo " PID: $(pgrep -f clash | head -1)" else echo -e " Status: ${RED}Not Running${NC}" fi