From 89bca53889d5914ce2bce219115345e423b139a9 Mon Sep 17 00:00:00 2001 From: juewuy Date: Sat, 12 Dec 2020 10:27:03 +0800 Subject: [PATCH] =?UTF-8?q?v1.0.0beta17.6=20~=E5=A4=A7=E5=B9=85=E5=BA=A6?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=92=8C=E4=BC=98=E5=8C=96=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=8A=9F=E8=83=BD=20~?= =?UTF-8?q?=E5=A4=A7=E5=B9=85=E5=BA=A6=E8=B0=83=E6=95=B4=E5=92=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=96=B0=E6=89=8B=E5=BC=95=E5=AF=BC=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=92=8C=E6=AD=A5=E9=AA=A4=20~=E6=96=B0=E5=A2=9EHackl0us?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E7=9A=84=E7=B2=BE=E7=AE=80=E7=89=88GeoIP?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E4=B8=8B=E8=BD=BD=20~=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=83=A8=E5=88=86=E6=83=85=E5=86=B5=E4=B8=8B=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=9C=AC=E5=9C=B0=E4=BB=A3=E7=90=86=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84bug=20~=E4=BF=AE=E5=A4=8D=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/clash.sh | 15 ++++++--------- scripts/getdate.sh | 10 ++++++++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/scripts/clash.sh b/scripts/clash.sh index 61ebf35..310368d 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -629,9 +629,8 @@ clashcfg(){ read -p "请输入对应数字 > " num if [ -z "$num" ]; then errornum - clashsh elif [ "$num" = 0 ]; then - clashsh + i= elif [ "$num" = 1 ]; then if [ "$USER" != "root" -a "$USER" != "admin" ];then echo ----------------------------------------------- @@ -680,10 +679,8 @@ clashcfg(){ elif [ "$num" = 9 ]; then clashstart - clashsh else errornum - clashsh fi } clashadv(){ @@ -714,9 +711,8 @@ clashadv(){ read -p "请输入对应数字 > " num if [ -z "$num" ]; then errornum - clashsh elif [ "$num" = 0 ]; then - clashsh + i= elif [ "$num" = 2 ]; then echo ----------------------------------------------- @@ -849,10 +845,8 @@ EOF elif [ "$num" = 9 ]; then clashstart sleep 1 - clashsh else errornum - clashsh fi } clashcron(){ @@ -999,13 +993,14 @@ clashsh(){ elif [ "$num" = 2 ]; then clashcfg + clashsh elif [ "$num" = 3 ]; then $clashdir/start.sh stop echo ----------------------------------------------- echo -e "\033[31mClash服务已停止!\033[0m" echo ----------------------------------------------- - exit; + clashsh elif [ "$num" = 4 ]; then echo ----------------------------------------------- @@ -1033,9 +1028,11 @@ clashsh(){ elif [ "$num" = 6 ]; then source $clashdir/getdate.sh && clashlink + clashsh elif [ "$num" = 7 ]; then clashadv + clashsh elif [ "$num" = 8 ]; then source $clashdir/getdate.sh && testcommand diff --git a/scripts/getdate.sh b/scripts/getdate.sh index c9312b6..b49fb60 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -188,7 +188,7 @@ getlink(){ elif [ "$url" = 0 ];then Url="" - clashlink + i=100 else echo ----------------------------------------------- @@ -225,6 +225,7 @@ getlink2(){ echo ----------------------------------------------- echo -e "\033[31m请输入正确的配置文件链接地址!!!\033[0m" echo -e "\033[33m仅支持http、https、ftp以及ftps链接!\033[0m" + sleep 1 clashlink fi } @@ -244,7 +245,6 @@ clashlink(){ read -p "请输入对应数字 > " num if [ -z "$num" ];then errornum - clashlink elif [ "$num" = 0 ];then i= elif [ "$num" = 1 ];then @@ -261,6 +261,7 @@ clashlink(){ fi fi getlink + clashlink elif [ "$num" = 2 ];then getlink2 @@ -270,6 +271,7 @@ clashlink(){ if [ ! -f "$yaml".bak ];then echo ----------------------------------------------- echo -e "\033[31m没有找到配置文件的备份!\033[0m" + clashlink else echo ----------------------------------------------- echo -e 备份文件共有"\033[32m`wc -l < $yamlbak`\033[0m"行内容,当前文件共有"\033[32m`wc -l < $yaml`\033[0m"行内容 @@ -278,9 +280,11 @@ clashlink(){ mv $yamlbak $yaml echo ----------------------------------------------- echo -e "\033[32m配置文件已还原!请手动重启clash服务!\033[0m" + sleep 1 else echo ----------------------------------------------- echo -e "\033[31m操作已取消!返回上级菜单!\033[0m" + clashlink fi fi @@ -298,6 +302,8 @@ clashlink(){ read -p "确认更新配置文件?[1/0] > " res if [ "$res" = '1' ]; then getyaml + else + clashlink fi fi