Disable listening on IPv6 ports when IPv6 is not supported (#102)
This commit is contained in:
parent
61fff44764
commit
dcd5c3fd6a
@ -56,6 +56,7 @@ ENV VIKUNJA_SENTRY_ENABLED false
|
||||
ENV VIKUNJA_SENTRY_DSN https://85694a2d757547cbbc90cd4b55c5a18d@o1047380.ingest.sentry.io/6024480
|
||||
|
||||
COPY docker/injector.sh /docker-entrypoint.d/50-injector.sh
|
||||
COPY docker/ipv6-disable.sh /docker-entrypoint.d/60-ipv6-disable.sh
|
||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY docker/templates/. /etc/nginx/templates/
|
||||
# copy compiled files from stage 1
|
||||
|
13
docker/ipv6-disable.sh
Normal file
13
docker/ipv6-disable.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
DEFAULT_CONF_FILE="etc/nginx/conf.d/default.conf"
|
||||
|
||||
if [ -f "/proc/net/if_inet6" ]; then
|
||||
echo "info: IPv6 available."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "info: IPv6 not available!"
|
||||
echo "info: Removing IPv6 lines from /$DEFAULT_CONF_FILE"
|
||||
sed -i 's/\(listen\s*\[::\].*\)$/#\1 # Disabled IPv6/' /${DEFAULT_CONF_FILE}
|
Loading…
x
Reference in New Issue
Block a user