mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
容器增加 ipv6 检测,自动配置 nginx
This commit is contained in:
@@ -482,6 +482,19 @@ patch_version() {
|
||||
fi
|
||||
}
|
||||
|
||||
init_nginx() {
|
||||
cp -fv $nginx_conf /etc/nginx/nginx.conf
|
||||
cp -fv $nginx_app_conf /etc/nginx/conf.d/front.conf
|
||||
sed -i "s,QL_BASE_URL,${qlBaseUrl},g" /etc/nginx/conf.d/front.conf
|
||||
|
||||
ipv6=$(ip a | grep inet6)
|
||||
ipv6Str=""
|
||||
if [[ $ipv6 ]]; then
|
||||
ipv6Str="listen [::]:5700 ipv6only=on;"
|
||||
fi
|
||||
sed -i "s,IPV6_CONFIG,${ipv6Str},g" /etc/nginx/conf.d/front.conf
|
||||
}
|
||||
|
||||
init_env
|
||||
detect_termux
|
||||
detect_macos
|
||||
|
||||
Reference in New Issue
Block a user