mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2025-12-16 01:31:28 +08:00
提交
This commit is contained in:
14
shutdown.sh
Normal file
14
shutdown.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user