summaryrefslogtreecommitdiff
path: root/idp/shib-entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'idp/shib-entrypoint.sh')
-rwxr-xr-xidp/shib-entrypoint.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/idp/shib-entrypoint.sh b/idp/shib-entrypoint.sh
index 9b3ece0..5439cc5 100755
--- a/idp/shib-entrypoint.sh
+++ b/idp/shib-entrypoint.sh
@@ -1,5 +1,11 @@
#!/bin/sh
+# Check if ldap can be connected to
+ldap_host=$(awk -F'/' '/idp.authn.LDAP.ldapURL=/ {print $3}' /opt/shibboleth-idp/conf/ldap.properties)
+if ! nc -w 3 -z $ldap_host 636; then
+ echo "Unable to connect to ldaps://$ldap_host"
+ exit 1
+fi
# if there is a metadata file for the test sp, enable it.
if [ -f /metadata/sp-metadata.xml ]; then