From 356b3812da44357275927cd4b9a110b6c1de334b Mon Sep 17 00:00:00 2001 From: wulabing Date: Thu, 18 Feb 2021 19:20:18 +0800 Subject: [PATCH] xray-1.0.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [modify] Nginx 各发行版源更新 适配 stable 最新版Nginx --- basic/nginx.repo | 7 +++++++ install.sh | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 basic/nginx.repo diff --git a/basic/nginx.repo b/basic/nginx.repo new file mode 100644 index 0000000..3894a9f --- /dev/null +++ b/basic/nginx.repo @@ -0,0 +1,7 @@ +[nginx-stable] +name=nginx stable repo +baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ +gpgcheck=1 +enabled=1 +gpgkey=https://nginx.org/keys/nginx_signing.key +module_hotfixes=true \ No newline at end of file diff --git a/install.sh b/install.sh index 5025b05..7dd9ccb 100644 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ OK="${Green}[OK]${Font}" ERROR="${Red}[ERROR]${Font}" # 变量 -shell_version="1.0.2" +shell_version="1.0.3" github_branch="xray" version_cmp="/tmp/version_cmp.tmp" xray_conf_dir="/usr/local/etc/xray" @@ -69,13 +69,18 @@ function system_check() { if [[ "${ID}" == "centos" && ${VERSION_ID} -ge 7 ]]; then print_ok "当前系统为 Centos ${VERSION_ID} ${VERSION}" INS="yum install -y" + 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" 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 + curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - apt update else print_error "当前系统为 ${ID} ${VERSION_ID} 不在支持的系统列表内"