From 3deeba12511c96548b1c5420a0a1dd7507ba9456 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 4 Feb 2020 11:45:14 +0100 Subject: [PATCH] fix wait-for ldap port detection --- overlay/usr/local/bin/entrypoint | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/overlay/usr/local/bin/entrypoint b/overlay/usr/local/bin/entrypoint index 70ed565..2c7e3f8 100755 --- a/overlay/usr/local/bin/entrypoint +++ b/overlay/usr/local/bin/entrypoint @@ -29,13 +29,13 @@ if [ -n "$BITWARDENRS_LDAP_HOST" ] then WAITFOR_LDAP_SSL=$(/usr/local/bin/gomplate -i '{{ getenv "BITWARDENRS_LDAP_SSL" "true" | conv.Bool }}') - if [ -z "$WAITFOR_LDAP_PORT" ] + if [ -z "$BITWARDENRS_LDAP_PORT" ] then - [ "$WAITFOR_LDAP_SSL" = true ] && WAITFOR_LDAP_PORT=636 || WAITFOR_LDAP_PORT=389 + [ "$WAITFOR_LDAP_SSL" = true ] && BITWARDENRS_LDAP_PORT=636 || BITWARDENRS_LDAP_PORT=389 fi - printf "Wait for ldap server on '%s:%s'...\n" "${BITWARDENRS_LDAP_HOST}" "${WAITFOR_LDAP_PORT}" - /usr/local/bin/wait-for "${BITWARDENRS_LDAP_HOST}":"${WAITFOR_LDAP_PORT}" + printf "Wait for ldap server on '%s:%s'...\n" "${BITWARDENRS_LDAP_HOST}" "${BITWARDENRS_LDAP_PORT}" + /usr/local/bin/wait-for "${BITWARDENRS_LDAP_HOST}":"${BITWARDENRS_LDAP_PORT}" fi exec env CONFIG_PATH=/app/config.toml /app/bitwarden_rs_ldap