fix wait-for ldap port detection
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2020-02-04 11:45:14 +01:00
parent 3aa164e483
commit 3deeba1251

View File

@ -29,13 +29,13 @@ if [ -n "$BITWARDENRS_LDAP_HOST" ]
then then
WAITFOR_LDAP_SSL=$(/usr/local/bin/gomplate -i '{{ getenv "BITWARDENRS_LDAP_SSL" "true" | conv.Bool }}') 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 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 fi
printf "Wait for ldap server on '%s:%s'...\n" "${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}":"${WAITFOR_LDAP_PORT}" /usr/local/bin/wait-for "${BITWARDENRS_LDAP_HOST}":"${BITWARDENRS_LDAP_PORT}"
fi fi
exec env CONFIG_PATH=/app/config.toml /app/bitwarden_rs_ldap exec env CONFIG_PATH=/app/config.toml /app/bitwarden_rs_ldap