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