From 2d6a4e0908612dfabbdc0488c22eea6e7cfd244b Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 21 May 2019 16:06:58 +0300 Subject: [PATCH] Fix crash on system without ipv6 --- run-document-server.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/run-document-server.sh b/run-document-server.sh index 008de7b..29ea5be 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -277,6 +277,11 @@ update_nginx_settings(){ ln -sf ${NGINX_ONLYOFFICE_PATH}/ds.conf.tmpl ${NGINX_ONLYOFFICE_CONF} 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 sed 's/linux/docker/' -i ${NGINX_ONLYOFFICE_EXAMPLE_CONF} fi