File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# Fixup the passwd file, in case we're on OpenShift
4- if ! whoami & > /dev/null; then
5- if [[ $( id -u) != 5050 ]]; then
6- if [[ -w /etc/passwd ]]; then
7- echo " ${USER_NAME:- pgadminr} :x:$( id -u) :0:${USER_NAME:- pgadminr} user:${HOME} :/sbin/nologin" >> /etc/passwd
8- fi
9- fi
4+ if ! whoami & > /dev/null && [[ $( id -u) != 5050 && -w /etc/passwd ]]; then
5+ echo " ${USER_NAME:- pgadminr} :x:$( id -u) :0:${USER_NAME:- pgadminr} user:${HOME} :/sbin/nologin" >> /etc/passwd
106fi
117
128# usage: file_env VAR [DEFAULT] ie: file_env 'XYZ_DB_PASSWORD' 'example'
@@ -178,12 +174,10 @@ TIMEOUT=$(cd /pgadmin4 && /venv/bin/python3 -c 'import config; print(config.SESS
178174
179175if [[ -n $PGADMIN_ENABLE_SOCK ]]; then
180176 BIND_ADDRESS=" unix:/run/pgadmin/pgadmin.sock"
177+ elif [[ -n $PGADMIN_ENABLE_TLS ]]; then
178+ BIND_ADDRESS=" ${PGADMIN_LISTEN_ADDRESS:- [::]} :${PGADMIN_LISTEN_PORT:- 443} "
181179else
182- if [[ -n $PGADMIN_ENABLE_TLS ]]; then
183- BIND_ADDRESS=" ${PGADMIN_LISTEN_ADDRESS:- [::]} :${PGADMIN_LISTEN_PORT:- 443} "
184- else
185- BIND_ADDRESS=" ${PGADMIN_LISTEN_ADDRESS:- [::]} :${PGADMIN_LISTEN_PORT:- 80} "
186- fi
180+ BIND_ADDRESS=" ${PGADMIN_LISTEN_ADDRESS:- [::]} :${PGADMIN_LISTEN_PORT:- 80} "
187181fi
188182
189183if [[ -n $PGADMIN_ENABLE_TLS ]]; then
You can’t perform that action at this time.
0 commit comments