2021-01-25 19:39:21 +08:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# 关闭clash服务
|
2022-01-14 23:14:50 +08:00
|
|
|
|
PID_NUM=`ps -ef | grep [c]lash-linux-a | wc -l`
|
|
|
|
|
PID=`ps -ef | grep [c]lash-linux-a | awk '{print $2}'`
|
2021-01-25 19:39:21 +08:00
|
|
|
|
if [ $PID_NUM -ne 0 ]; then
|
|
|
|
|
kill -9 $PID
|
2022-01-14 23:14:50 +08:00
|
|
|
|
# ps -ef | grep [c]lash-linux-a | awk '{print $2}' | xargs kill -9
|
2021-01-25 19:39:21 +08:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# 清除环境变量
|
|
|
|
|
> /etc/profile.d/clash.sh
|
|
|
|
|
|
2022-12-09 16:26:48 +08:00
|
|
|
|
echo -e "\n服务关闭成功,请执行以下命令关闭系统代理:proxy_off\n"
|