From cb464104fa0a1a35a15869ebb7e1d820dd0ee5e5 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 22 Jan 2021 16:25:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9i?= =?UTF-8?q?p=E6=A3=80=E6=B5=8B=E6=96=B9=E6=B3=95=E3=80=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=BD=AF=E8=BF=9E=E6=8E=A5=E6=A3=80=E6=B5=8B=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 76dfcf5..a9c039e 100644 --- a/install.sh +++ b/install.sh @@ -538,10 +538,10 @@ EOF # 检查ip checkIP() { echoContent skyBlue " ---> 检查ipv4中" - pingIP=$(ping -c 1 -W 1000 ${domain} | sed '1{s/[^(]*(//;s/).*//;q;}') + pingIP=$(ping -c 1 -W 1000 ${domain} | sed '2{s/[^(]*(//;s/).*//;q;}' | sed -n '$p') if [[ -z $(echo "${pingIP}" | awk -F "[.]" '{print $4}') ]]; then echoContent skyBlue " ---> 检查ipv6中" - pingIP=$(ping6 -c 1 ${domain} | sed '1{s/[^(]*(//;s/).*//;q;}') + pingIP=$(ping6 -c 1 ${domain} | sed '2{s/[^(]*(//;s/).*//;q;}' | sed -n '$p') pingIPv6=${pingIP} fi @@ -2637,7 +2637,7 @@ checkLog() { # 脚本快捷方式 aliasInstall() { - if [[ -f "$HOME/install.sh" ]] && [[ -d "/etc/v2ray-agent" ]] && "$HOME/install.sh" | grep -q "作者:mack-a"; then + if [[ -f "$HOME/install.sh" ]] && [[ -d "/etc/v2ray-agent" ]] && grep <$HOME/install.sh -q "作者:mack-a"; then mv "$HOME/install.sh" /etc/v2ray-agent/install.sh if [[ -d "/usr/bin/" ]] && [[ ! -f "/usr/bin/vasma" ]]; then ln -s /etc/v2ray-agent/install.sh /usr/bin/vasma @@ -3086,7 +3086,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.3.7" + echoContent green "当前版本:v2.3.8" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:七合一共存脚本" echoContent red "=============================================================="