From 66aacfe2c7648c8751d2a3132add5967f2b7a8a4 Mon Sep 17 00:00:00 2001 From: fscarmen <62703343+fscarmen@users.noreply.github.com> Date: Mon, 13 Jun 2022 10:03:18 +0800 Subject: [PATCH] Update return.sh --- return.sh | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/return.sh b/return.sh index 4b6870b..80745d9 100644 --- a/return.sh +++ b/return.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +ip=$1 TEMP_FILE='ip.temp' ARCHITECTURE="$(uname -m)" @@ -8,22 +9,6 @@ case $ARCHITECTURE in * ) echo -e "只支持 AMD64、ARM64 使用,问题反馈:[https://github.com/fscarmen/tools/issues]" && exit 1;; esac -# 多方式判断操作系统,试到有值为止。只支持 Debian 10/11、Ubuntu 18.04/20.04 或 CentOS 7/8 ,如非上述操作系统,退出脚本 -CMD=( "$(grep -i pretty_name /etc/os-release 2>/dev/null | cut -d \" -f2)" - "$(hostnamectl 2>/dev/null | grep -i system | cut -d : -f2)" - "$(lsb_release -sd 2>/dev/null)" - "$(grep -i description /etc/lsb-release 2>/dev/null | cut -d \" -f2)" - "$(grep . /etc/redhat-release 2>/dev/null)" - "$(grep . /etc/issue 2>/dev/null | cut -d \\ -f1 | sed '/^[ ]*$/d')" - ) - -for a in "${CMD[@]}"; do - SYS="$a" && [[ -n $SYS ]] && break -done - -[[ -z $SYS ]] && echo -e "本脚本只支持 Debian、Ubuntu、CentOS 和 Alpine 系统,问题反馈:[https://github.com/fscarmen/warp_unlock/issues]" && exit 1 - -ip=$1 [[ -z "$ip" ]] && echo -e "请填入上对端 IP" && exit 1 echo -e "\n说明:测 VPS ——> 对端 经过的地区及线路,填本地IP就是测回程。" [[ ! -e "$FILE" ]] && wget -qN https://cdn.jsdelivr.net/gh/fscarmen/tools/besttrace/$FILE