Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix linking /run/secrets
These are to be linked only if they exists.
mederly committed Feb 12, 2019
1 parent 9e80ecd commit 8a29254
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions container_files/usr-local-bin/start-httpd.sh
@@ -1,8 +1,16 @@
#!/bin/bash

echo "Linking secrets and config files; using authentication: $AUTHENTICATION"
ln -sf /run/secrets/mp_sp-key.pem /etc/shibboleth/sp-key.pem
ln -sf /run/secrets/mp_host-key.pem /etc/pki/tls/private/host-key.pem
echo "Linking secrets"
for filepath in /run/secrets/*; do
label_file=`basename $filepath`
if [ "$label_file" == "mp_sp-key.pem" ]; then
ln -sf /run/secrets/mp_sp-key.pem /etc/shibboleth/sp-key.pem
elif [ "$label_file" == "mp_host-key.pem" ]; then
ln -sf /run/secrets/mp_host-key.pem /etc/pki/tls/private/host-key.pem
fi
done

echo "Linking config files; using authentication: $AUTHENTICATION"
ln -sf /etc/httpd/conf.d/midpoint.conf.auth.$AUTHENTICATION /etc/httpd/conf.d/midpoint.conf
ln -sf /etc/httpd/conf.d/shib.conf.auth.$AUTHENTICATION /etc/httpd/conf.d/shib.conf
ln -sf /etc/httpd/conf.modules.d/00-shib.conf.auth.$AUTHENTICATION /etc/httpd/conf.modules.d/00-shib.conf

0 comments on commit 8a29254

Please sign in to comment.