fix(tproxy): detect clash process with any name (clash-linux-amd64, etc.)
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b00cec6b3b
commit
7d257cd35f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue