remove ipv6 conf from nginx proxy if ipv6 not enabled
This commit is contained in:
parent
6cab57932e
commit
9b830c5b19
|
@ -8,7 +8,7 @@ NGINX_CONF_FILE="/etc/nginx/nginx.conf"
|
||||||
DEFAULT_CONF_FILE="/etc/nginx/conf.d/default.conf"
|
DEFAULT_CONF_FILE="/etc/nginx/conf.d/default.conf"
|
||||||
|
|
||||||
# check if we have ipv6 available
|
# 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
|
# ipv6 not available so delete lines from nginx conf
|
||||||
if [ -f "$NGINX_CONF_FILE" ]; then
|
if [ -f "$NGINX_CONF_FILE" ]; then
|
||||||
sed -i '/listen \[::\]/d' $NGINX_CONF_FILE
|
sed -i '/listen \[::\]/d' $NGINX_CONF_FILE
|
||||||
|
|
Loading…
Reference in New Issue