mirror of https://github.com/mack-a/v2ray-agent
fix(脚本): 修复更换域名时订阅无法正常拉取的问题
parent
3071ec8e08
commit
e0268acbce
14
install.sh
14
install.sh
|
@ -356,9 +356,17 @@ readNginxSubscribe() {
|
||||||
if [[ -f "${nginxConfigPath}subscribe.conf" ]]; then
|
if [[ -f "${nginxConfigPath}subscribe.conf" ]]; then
|
||||||
if grep -q "sing-box" "${nginxConfigPath}subscribe.conf"; then
|
if grep -q "sing-box" "${nginxConfigPath}subscribe.conf"; then
|
||||||
subscribePort=$(grep "listen" "${nginxConfigPath}subscribe.conf" | awk '{print $2}')
|
subscribePort=$(grep "listen" "${nginxConfigPath}subscribe.conf" | awk '{print $2}')
|
||||||
if ! grep "listen" "${nginxConfigPath}subscribe.conf" | grep -q "ssl"; then
|
subscribeDomain=$(grep "server_name" "${nginxConfigPath}subscribe.conf" | awk '{print $2}')
|
||||||
subscribeType="http"
|
subscribeDomain=${subscribeDomain//;/}
|
||||||
|
if [[ "${subscribeDomain}" != "${currentHost}" ]]; then
|
||||||
|
subscribePort=
|
||||||
|
subscribeType=
|
||||||
|
else
|
||||||
|
if ! grep "listen" "${nginxConfigPath}subscribe.conf" | grep -q "ssl"; then
|
||||||
|
subscribeType="http"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -9392,7 +9400,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.5"
|
echoContent green "当前版本:v3.3.6"
|
||||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:八合一共存脚本\c"
|
echoContent green "描述:八合一共存脚本\c"
|
||||||
showInstallStatus
|
showInstallStatus
|
||||||
|
|
Loading…
Reference in New Issue