1
0
Fork 0
mirror of synced 2024-06-30 12:00:31 +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 6cab57932e
commit 9b830c5b19

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