From bc995fa566717a3304924bb2aef2fa20d6b2b066 Mon Sep 17 00:00:00 2001 From: wulabing Date: Thu, 18 Feb 2021 23:28:32 +0800 Subject: [PATCH] xray-1.0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [fix] lsb_release 命令不存在 --- install.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 7dd9ccb..36f6567 100644 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ OK="${Green}[OK]${Font}" ERROR="${Red}[ERROR]${Font}" # 变量 -shell_version="1.0.3" +shell_version="1.0.4" github_branch="xray" version_cmp="/tmp/version_cmp.tmp" xray_conf_dir="/usr/local/etc/xray" @@ -72,14 +72,19 @@ function system_check() { wget -N -P /etc/yum.repos.d/ https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/xray/basic/nginx.repo elif [[ "${ID}" == "debian" && ${VERSION_ID} -ge 9 ]]; then print_ok "当前系统为 Debian ${VERSION_ID} ${VERSION}" - echo "deb http://nginx.org/packages/debian $(lsb_release -cs) nginx" > /etc/apt/sources.list.d/nginx.list - curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - INS="apt install -y" + INS lsb-release + + echo "deb http://nginx.org/packages/debian $(lsb_release -cs) nginx" >/etc/apt/sources.list.d/nginx.list + curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - + apt update elif [[ "${ID}" == "ubuntu" && $(echo "${VERSION_ID}" | cut -d '.' -f1) -ge 18 ]]; then print_ok "当前系统为 Ubuntu ${VERSION_ID} ${UBUNTU_CODENAME}" INS="apt install -y" - echo "deb http://nginx.org/packages/ubuntu $(lsb_release -cs) nginx" > /etc/apt/sources.list.d/nginx.list + INS lsb-release + + echo "deb http://nginx.org/packages/ubuntu $(lsb_release -cs) nginx" >/etc/apt/sources.list.d/nginx.list curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - apt update else