Fix crash on system without ipv6

This commit is contained in:
Alexey Golubev 2019-05-21 16:06:58 +03:00 committed by Alexey Golubev
parent 5031b7f983
commit 2d6a4e0908

View file

@ -277,6 +277,11 @@ update_nginx_settings(){
ln -sf ${NGINX_ONLYOFFICE_PATH}/ds.conf.tmpl ${NGINX_ONLYOFFICE_CONF} ln -sf ${NGINX_ONLYOFFICE_PATH}/ds.conf.tmpl ${NGINX_ONLYOFFICE_CONF}
fi fi
# check if ipv6 supported otherwise remove it from nginx config
if [ ! -f /proc/net/if_inet6 ]; then
sed '/listen\s\+\[::[0-9]*\].\+/d' -i $NGINX_ONLYOFFICE_CONF
fi
if [ -f "${NGINX_ONLYOFFICE_EXAMPLE_CONF}" ]; then if [ -f "${NGINX_ONLYOFFICE_EXAMPLE_CONF}" ]; then
sed 's/linux/docker/' -i ${NGINX_ONLYOFFICE_EXAMPLE_CONF} sed 's/linux/docker/' -i ${NGINX_ONLYOFFICE_EXAMPLE_CONF}
fi fi