Don't listen on port 443 if TLS is not enabled when launching the container. Fixes #2998

pull/18/head
Dave Page 2018-01-11 15:04:11 +00:00
parent 405de59298
commit 8b3aecd137
1 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,16 @@
export PGADMIN_SETUP_EMAIL=${PGADMIN_DEFAULT_EMAIL}
export PGADMIN_SETUP_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
if [ ${PGADMIN_ENABLE_TLS} != "True" ]; then
if [ -f /etc/httpd/conf.d/ssl.conf ]; then
mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.disabled
fi
else
if [ -f /etc/httpd/conf.d/ssl.conf.disabled ]; then
mv /etc/httpd/conf.d/ssl.conf.disabled /etc/httpd/conf.d/ssl.conf
fi
fi
j2 /templates/pgadmin4.conf.j2 > /etc/httpd/conf.d/pgadmin4.conf
rm -f /run/httpd/httpd.pid