fix wait-for ldap port detection
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Robert Kaussow 2020-02-04 11:45:14 +01:00
parent 3aa164e483
commit 3deeba1251
1 changed files with 4 additions and 4 deletions

View File

@ -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