Skip to content

Commit

Permalink
Disable mod_shib when shibboleth is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
xcompass committed Nov 26, 2024
1 parent 72844ad commit d759267
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 d759267

Please sign in to comment.