Skip to content

Commit

Permalink
Disable mod_shib when shibboleth is not enabled
Browse files Browse the repository at this point in the history
xcompass committed Nov 26, 2024

Verified

This commit was signed with the committer’s verified signature.
xcompass Pan Luo
1 parent 7130ae5 commit 489b438
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docker-entrypoint.d/shib
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash
set -e

export SHIBD_SERVICE_IP=`getent hosts ${SHIBD_SERVICE_NAME} | awk '{ print $1 }'`
if [[ -z "${SHIBBOLETH_SP_ENTITY_ID}" ]]; then
# disable mod_shib
a2dismod shib
else
export SHIBD_SERVICE_IP=`getent hosts ${SHIBD_SERVICE_NAME} | awk '{ print $1 }'`

envsubst < /etc/shibboleth/shibboleth2.xml-template > /etc/shibboleth/shibboleth2.xml
chmod 644 /etc/shibboleth/shibboleth2.xml
envsubst < /etc/shibboleth/shibboleth2.xml-template > /etc/shibboleth/shibboleth2.xml
chmod 644 /etc/shibboleth/shibboleth2.xml
fi

0 comments on commit 489b438

Please sign in to comment.