clash_for_linux/shutdown.sh
2022-12-09 16:26:48 +08:00

15 lines
385 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 关闭clash服务
PID_NUM=`ps -ef | grep [c]lash-linux-a | wc -l`
PID=`ps -ef | grep [c]lash-linux-a | awk '{print $2}'`
if [ $PID_NUM -ne 0 ]; then
kill -9 $PID
# ps -ef | grep [c]lash-linux-a | awk '{print $2}' | xargs kill -9
fi
# 清除环境变量
> /etc/profile.d/clash.sh
echo -e "\n服务关闭成功请执行以下命令关闭系统代理proxy_off\n"