From 5f5d384d53b24d5d9c3edb8992e08d1464ec3f1a Mon Sep 17 00:00:00 2001 From: juewuy Date: Mon, 21 Dec 2020 11:55:43 +0800 Subject: [PATCH] =?UTF-8?q?v1.0.0beta18.2=20~=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=83=85=E5=86=B5=E4=B8=8B=E9=A6=96=E6=AC=A1=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=9C=AC=E5=9C=B0=E9=9D=A2=E6=9D=BF=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84bug=20~=E4=BF=AE=E5=A4=8D=E5=8D=B8=E8=BD=BD=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E7=A1=AE=E7=A7=BB=E9=99=A4=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/getdate.sh | 22 +++++++++++----------- scripts/start.sh | 3 +++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/scripts/getdate.sh b/scripts/getdate.sh index 8af8d0f..a61db30 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -652,9 +652,9 @@ setcrt(){ echo ----------------------------------------------- echo -e "\033[36m安装/更新本地根证书文件(ca-certificates.crt)\033[0m" echo -e "\033[33m用于解决证书校验错误,x509报错等问题\033[0m" - echo -e "\033[31m无上述问题的设备无需使用本功能!\033[0m" - [ -f "$crtdir" ] && echo -e "\033[32m当前设备已经安装根证书文件了!\033[0m" + echo -e "\033[31m无上述问题的设备请勿使用!\033[0m" echo ----------------------------------------------- + [ -f "$crtdir" ] && echo -e "\033[33m检测到系统已经安装根证书文件了!\033[0m\n-----------------------------------------------" read -p "确认安装?(1/0) > " res if [ -z "$res" ];then @@ -820,19 +820,19 @@ update(){ read -p "确认卸载ShellClash?(警告:该操作不可逆!)[1/0] " res if [ "$res" = '1' ]; then $clashdir/start.sh stop - rm -rf $clashdir - rm -rf /etc/init.d/clash - rm -rf /etc/systemd/system/clash.service - rm -rf /usr/lib/systemd/system/clash.service - rm -rf /www/clash + $clashdir/start.sh cronset "clash服务" + $clashdir/start.sh cronset "订阅链接" [ -w ~/.bashrc ] && profile=~/.bashrc [ -w /etc/profile ] && profile=/etc/profile sed -i '/alias clash=*/'d $profile sed -i '/export clashdir=*/'d $profile sed -i '/all_proxy/'d $profile sed -i '/ALL_PROXY/'d $profile - cronset "clash服务" - cronset "订阅链接" + rm -rf $clashdir + rm -rf /etc/init.d/clash + rm -rf /etc/systemd/system/clash.service + rm -rf /usr/lib/systemd/system/clash.service + rm -rf /www/clash echo ----------------------------------------------- echo -e "\033[36m已卸载ShellClash相关文件!有缘再会!\033[0m" echo -e "\033[33m请手动关闭当前窗口以重置环境变量!\033[0m" @@ -919,14 +919,14 @@ userguide(){ echo -e "\033[33m安装本地Dashboard面板,可以更快捷的管理clash内置规则!\033[0m" echo ----------------------------------------------- read -p "需要安装本地Dashboard面板吗?(1/0) > " res - [ "$res" = 1 ] && setdb + [ "$res" = 1 ] && checkupdate && setdb #检测及下载根证书 if [ -d /etc/ssl/certs -a ! -f '/etc/ssl/certs/ca-certificates.crt' ];then echo ----------------------------------------------- echo -e "\033[33m当前设备未找到根证书文件\033[0m" echo ----------------------------------------------- read -p "是否下载并安装根证书?(1/0) > " res - [ "$res" = 1 ] && getcrt + [ "$res" = 1 ] && checkupdate && getcrt fi #提示导入订阅或者配置文件 echo ----------------------------------------------- diff --git a/scripts/start.sh b/scripts/start.sh index e5aed2b..cda8422 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -657,6 +657,9 @@ daemon) getconfig cronset '#clash保守模式守护进程' "*/1 * * * * test -z \"$(pidof clash)\" && $clashdir/start.sh restart #clash保守模式守护进程" ;; +cronset) + cronset $2 $3 + ;; set_proxy) getconfig #GNOME配置