OpenSlides/server/docker/saml-setup.sh

11 lines
568 B
Bash
Raw Normal View History

# SAML setup
if [[ "$ENABLE_SAML" = True ]]; then
echo "Setting up SAML"
for i in /run/secrets/saml_{cert,key,config}; do
[[ -f "$i" ]] || { echo "ERROR: $i not found!"; exit 3; }
done
test -L /app/personal_data/var/certs/sp.crt || { ln -s /run/secrets/saml_cert /app/personal_data/var/certs/sp.crt; }
test -L /app/personal_data/var/certs/sp.key || { ln -s /run/secrets/saml_key /app/personal_data/var/certs/sp.key; }
test -L /app/personal_data/var/saml_settings.json || { ln -s /run/secrets/saml_config /app/personal_data/var/saml_settings.json; }
fi