From c98e69cce67ed9930e0d5bad9be2bf9b75fdc0a2 Mon Sep 17 00:00:00 2001 From: juewuy Date: Sun, 25 Oct 2020 16:31:08 +0800 Subject: [PATCH] =?UTF-8?q?v1.0.0beta15.6=20~Redir=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9F=BA=E4=BA=8Etproxy=E7=9A=84udp=E4=BB=A3?= =?UTF-8?q?=E7=90=86=20~=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E7=94=9F?= =?UTF-8?q?=E6=88=90pac=E9=80=BB=E8=BE=91=20~=E5=A2=9E=E5=8A=A0Gnome?= =?UTF-8?q?=E4=BB=A5=E5=8F=8AKDE=E6=A1=8C=E9=9D=A2=E7=9A=84=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=AE=BE=E7=BD=AE=E6=9C=AC=E6=9C=BA=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20~=E4=BF=AE=E5=A4=8D=E5=90=84=E7=A7=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?bug=20~=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=AD=E6=97=B6=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84bug=20~=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E6=97=B6=E5=90=8C=E6=97=B6=E4=B8=8B=E8=BD=BD=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E7=9A=84bug=20~=E4=BF=AE=E5=A4=8D=E6=96=B0=E6=89=8B=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E6=8A=A5=E9=94=99=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 3 ++- scripts/getdate.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 4eec1ae..8959ab3 100644 --- a/install.sh +++ b/install.sh @@ -153,7 +153,6 @@ echo 目标目录磁盘剩余:$(df -h $dir | awk '{print $4}' | sed 1d ) read -p "确认安装?(1/0) > " res [ "$res" != "1" ] && setdir clashdir=$dir/clash -install } #输出 @@ -175,9 +174,11 @@ if [ -n "$clashdir" ];then echo ----------------------------------------------- $echo "\033[31m 旧版本文件已卸载!\033[0m" setdir + install elif [ "$res" = "9" ];then echo 测试模式,变更安装位置 setdir + install else $echo "\033[31m输入错误!已取消安装!\033[0m" exit; diff --git a/scripts/getdate.sh b/scripts/getdate.sh index 3621807..afb5f03 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -681,7 +681,8 @@ getdb(){ sed -i "s/127.0.0.1/${host}/g" $dbdir/app*.js sed -i "s/7892/${db_port}/g" $dbdir/app*.js fi - [ "$dbdir" != "/www/clash" ] && $clashdir/start.sh restart + #如果clash在运行则重启clash服务 + [ "$dbdir" != "/www/clash" ] && [ -n "$PID" ] && $clashdir/start.sh restart #写入配置文件 sed -i '/hostdir*/'d $ccfg sed -i "1i\hostdir=\'$hostdir\'" $ccfg