Skip to content

Commit 608c718

Browse files
committed
Restructure invokation options
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent e11afa5 commit 608c718

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

docker/start.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,21 @@ satosa-saml-metadata \
3838
"${DATA_DIR}/metadata.crt" \
3939
--dir "${METADATA_DIR}"
4040

41+
# if the user provided a gunicorn configuration, use it
4142
if [ -f "$GUNICORN_CONF" ]
4243
then conf_opt="--config ${GUNICORN_CONF}"
4344
fi
4445

45-
# start the proxy
4646
# if HTTPS cert is available, use it
4747
https_key="${DATA_DIR}/https.key"
4848
https_crt="${DATA_DIR}/https.crt"
49-
if [ -f "$https_key" && -f "$https_crt" ]
50-
then exec gunicorn $conf_opt -b0.0.0.0:"${PROXY_PORT}" satosa.wsgi:app --keyfile "$https_key" --certfile "$https_crt"
51-
else exec gunicorn $conf_opt -b0.0.0.0:"${PROXY_PORT}" satosa.wsgi:app
49+
if [ -f "$https_key" -a -f "$https_crt" ]
50+
then https_opts="--keyfile ${https_key} --certfile ${https_crt}"
5251
fi
52+
53+
# start the proxy
54+
exec gunicorn $conf_opt \
55+
-b 0.0.0.0:"${PROXY_PORT}" \
56+
satosa.wsgi:app \
57+
$https_opts \
58+
;

0 commit comments

Comments
 (0)