From 04738329153ee15afa6b4c638dfbbd3f054ea4a4 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 19 Oct 2020 20:14:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=97=A0=E6=B3=95=E8=AF=86=E5=88=ABip=E7=9A=84bug?= =?UTF-8?q?=E3=80=81=E4=BB=A5=E5=8F=8A=E6=89=A7=E8=A1=8C=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=8E=92=E6=9F=A5=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 5d32a04..70e6470 100644 --- a/install.sh +++ b/install.sh @@ -264,11 +264,7 @@ initTLSNginxConfig(){ } # 检查ip checkIP(){ - pingIP=`ping -c 1 -W 1000 ${domain}|awk '{print $4}'|head -2|tail -n 1` - if [[ ! -z "${pingIP}" ]] - then - pingIP=`echo ${pingIP}|awk -F "[.]" '{print $1"."$2"."$3"."$4}'` - fi + pingIP=`ping -c 1 -W 1000 ${domain}|sed '1{s/[^(]*(//;s/).*//;q}'` if [[ ! -z "${pingIP}" ]] && [[ `echo ${pingIP}|grep '^\([1-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)\.\([0-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)\.\([0-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)\.\([0-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)$'` ]] then read -p "当前域名的IP为 [${pingIP}],是否正确[y/n]?" domainStatus From 1b5f0caa28f69d6162b08242f26cb01d27fe1788 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 19 Oct 2020 20:14:51 +0800 Subject: [PATCH 2/2] feat(version): upgrade --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 70e6470..0eff7a7 100644 --- a/install.sh +++ b/install.sh @@ -2093,7 +2093,7 @@ menu(){ cd echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.1.1" + echoContent green "当前版本:v2.1.2" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:七合一共存脚本" echoContent red "=============================================================="