fix(脚本): 修复sing-box安装Reality后无法启动问题、修复端口无法通过校验问题

pull/1073/head
mack-a 2024-07-03 00:30:40 +08:00
parent e0268acbce
commit f09f2c78c1
1 changed files with 4 additions and 2 deletions

View File

@ -358,7 +358,7 @@ readNginxSubscribe() {
subscribePort=$(grep "listen" "${nginxConfigPath}subscribe.conf" | awk '{print $2}') subscribePort=$(grep "listen" "${nginxConfigPath}subscribe.conf" | awk '{print $2}')
subscribeDomain=$(grep "server_name" "${nginxConfigPath}subscribe.conf" | awk '{print $2}') subscribeDomain=$(grep "server_name" "${nginxConfigPath}subscribe.conf" | awk '{print $2}')
subscribeDomain=${subscribeDomain//;/} subscribeDomain=${subscribeDomain//;/}
if [[ "${subscribeDomain}" != "${currentHost}" ]]; then if [[ -n "${currentHost}" && "${subscribeDomain}" != "${currentHost}" ]]; then
subscribePort= subscribePort=
subscribeType= subscribeType=
else else
@ -1306,8 +1306,10 @@ checkPortOpen() {
local domain=$2 local domain=$2
local checkPortOpenResult= local checkPortOpenResult=
allowPort "${port}" allowPort "${port}"
if [[ -z "${btDomain}" ]]; then if [[ -z "${btDomain}" ]]; then
handleNginx stop
# 初始化nginx配置 # 初始化nginx配置
touch ${nginxConfigPath}checkPortOpen.conf touch ${nginxConfigPath}checkPortOpen.conf
cat <<EOF >${nginxConfigPath}checkPortOpen.conf cat <<EOF >${nginxConfigPath}checkPortOpen.conf
@ -9400,7 +9402,7 @@ menu() {
cd "$HOME" || exit cd "$HOME" || exit
echoContent red "\n==============================================================" echoContent red "\n=============================================================="
echoContent green "作者mack-a" echoContent green "作者mack-a"
echoContent green "当前版本v3.3.6" echoContent green "当前版本v3.3.7"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent" echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c" echoContent green "描述:八合一共存脚本\c"
showInstallStatus showInstallStatus