1
0
Fork 0
mirror of synced 2024-07-01 04:21:06 +12:00

remove ipv6 conf from nginx proxy if ipv6 not enabled

This commit is contained in:
Jonny McCullagh 2022-10-12 14:54:25 +01:00
parent 67301cfb58
commit af2203fac8

View file

@ -8,7 +8,7 @@ NGINX_CONF_FILE="/etc/nginx/nginx.conf"
DEFAULT_CONF_FILE="/etc/nginx/conf.d/default.conf"
# check if we have ipv6 available
if [ ! -f "/proc/net/if_jonnyinet6" ]; then
if [ ! -f "/proc/net/if_inet6" ]; then
# ipv6 not available so delete lines from nginx conf
if [ -f "$NGINX_CONF_FILE" ]; then
sed -i '/listen \[::\]/d' $NGINX_CONF_FILE