v1.0.0beta17.7
~增加了在使用功能设置变更配置后告知用户重启的提示 ~修复定时更新订阅时不会重启clash服务的bug ~优化语句结构,修复部分情况下菜单层级错乱的bug ~修复卸载时不会清除部分定时任务的bug ~修复pac在部分设备上不可用的bug(待测试)
This commit is contained in:
@@ -122,6 +122,13 @@ clashstart(){
|
||||
sleep 1
|
||||
[ -n "$(pidof clash)" ] && startover
|
||||
}
|
||||
checkrestart(){
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[32m检测到配置文件已变更,需要重启clash服务以生效!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
read -p "是否现在重启clash服务?(1/0) > " res
|
||||
[ "$res" = 1 ] && clashstart
|
||||
}
|
||||
#功能相关
|
||||
setport(){
|
||||
[ -z "$secret" ] && secret=未设置
|
||||
@@ -998,7 +1005,10 @@ clashsh(){
|
||||
exit;
|
||||
|
||||
elif [ "$num" = 2 ]; then
|
||||
checkcfg=$(cat $ccfg)
|
||||
clashcfg
|
||||
checkcfg_new=$(cat $ccfg)
|
||||
[ "$checkcfg" != "$checkcfg_new" ] && checkrestart
|
||||
clashsh
|
||||
|
||||
elif [ "$num" = 3 ]; then
|
||||
@@ -1037,7 +1047,10 @@ clashsh(){
|
||||
clashsh
|
||||
|
||||
elif [ "$num" = 7 ]; then
|
||||
checkcfg=$(cat $ccfg)
|
||||
clashadv
|
||||
checkcfg_new=$(cat $ccfg)
|
||||
[ "$checkcfg" != "$checkcfg_new" ] && checkrestart
|
||||
clashsh
|
||||
|
||||
elif [ "$num" = 8 ]; then
|
||||
|
||||
Reference in New Issue
Block a user