From 345db6aa2043a512869115673363b16cf5f379fc Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Thu, 8 Jun 2023 11:32:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9w?= =?UTF-8?q?arp=E5=85=A8=E5=B1=80=E5=88=86=E6=B5=81=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=81=E6=B7=BB=E5=8A=A0=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E9=BB=98=E8=AE=A4nginx=E9=85=8D=E7=BD=AE=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E5=8D=A0=E7=94=A880=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index ef6533e..bd994ed 100644 --- a/install.sh +++ b/install.sh @@ -1130,6 +1130,15 @@ initTLSNginxConfig() { # handleNginx start } +# 删除nginx默认的配置 +removeNginxDefaultConf() { + if [[ -f ${nginxConfigPath}default.conf ]]; then + if [[ "$(grep -c "server_name" <${nginxConfigPath}default.conf)" == "1" ]] && [[ "$(grep -c "server_name localhost;" <${nginxConfigPath}default.conf)" == "1" ]]; then + echoContent green " ---> 删除Nginx默认配置" + rm -rf ${nginxConfigPath}default.conf + fi + fi +} # 修改nginx重定向配置 updateRedirectNginxConf() { local redirectDomain= @@ -1465,6 +1474,7 @@ customPortFunction() { echoContent yellow "\n ---> 端口: ${port}" if [[ -z "${btDomain}" ]]; then checkDNSIP "${domain}" + removeNginxDefaultConf checkPortOpen "${port}" "${domain}" fi else @@ -2357,7 +2367,7 @@ handleXray() { echoContent green " ---> Xray启动成功" else echoContent red "Xray启动失败" - echoContent red "请手动执行【/etc/v2ray-agent/xray/xray -confdir /etc/v2ray-agent/xray/conf】,查看错误日志" + echoContent red "请手动执行以下的命令后【/etc/v2ray-agent/xray/xray -confdir /etc/v2ray-agent/xray/conf】将错误日志进行反馈" exit 0 fi elif [[ "$1" == "stop" ]]; then @@ -5432,9 +5442,7 @@ EOF exit 0 fi - elif - [[ "${warpStatus}" == "4" ]] - then + elif [[ "${warpStatus}" == "4" ]]; then ${removeType} cloudflare-warp >/dev/null 2>&1 @@ -5551,7 +5559,7 @@ warpRoutingReg() { "settings": { "secretKey": "${secretKeyWarpReg}", "address": [ - ${address} + "${address}" ], "peers": [ { @@ -5950,7 +5958,6 @@ EOF fi done < <(echo "${domainList}" | tr ',' '\n') - if [[ -f "${configPath}09_routing.json" ]]; then unInstallRouting dokodemoDoor-80 inboundTag unInstallRouting dokodemoDoor-443 inboundTag @@ -7388,7 +7395,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.9.12" + echoContent green "当前版本:v2.9.13" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus