diff --git a/container_files/usr-local-bin/start-httpd.sh b/container_files/usr-local-bin/start-httpd.sh index 0bc2028..96ad214 100755 --- a/container_files/usr-local-bin/start-httpd.sh +++ b/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