chore: replace deprecated binary and conv functions (#62)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2022-06-13 20:29:37 +02:00
parent e23105d504
commit 5e265b9e6e
2 changed files with 4 additions and 4 deletions

View File

@ -8,8 +8,8 @@ ldap_host = "{{ getenv "VAULTWARDEN_LDAP_HOST" }}"
{{ if (getenv "VAULTWARDEN_LDAP_SCHEME") -}} {{ if (getenv "VAULTWARDEN_LDAP_SCHEME") -}}
ldap_scheme = "{{ getenv "VAULTWARDEN_LDAP_SCHEME" }}" ldap_scheme = "{{ getenv "VAULTWARDEN_LDAP_SCHEME" }}"
{{ end -}} {{ end -}}
ldap_ssl = {{ getenv "VAULTWARDEN_LDAP_SSL" "true" | conv.Bool }} ldap_ssl = {{ getenv "VAULTWARDEN_LDAP_SSL" "true" | conv.ToBool }}
ldap_no_tls_verify = {{ not (getenv "VAULTWARDEN_LDAP_SSL_VERIFY" "true" | conv.Bool) }} ldap_no_tls_verify = {{ not (getenv "VAULTWARDEN_LDAP_SSL_VERIFY" "true" | conv.ToBool) }}
{{ if (getenv "VAULTWARDEN_LDAP_PORT") -}} {{ if (getenv "VAULTWARDEN_LDAP_PORT") -}}
ldap_port = {{ getenv "VAULTWARDEN_LDAP_PORT" }} ldap_port = {{ getenv "VAULTWARDEN_LDAP_PORT" }}
{{ end -}} {{ end -}}
@ -19,4 +19,4 @@ ldap_search_base_dn = "{{ getenv "VAULTWARDEN_LDAP_SEARCH_BASE_DN" }}"
ldap_search_filter = "{{ getenv "VAULTWARDEN_LDAP_SEARCH_FILTER" "(&(objectClass=*)(uid=*))" }}" ldap_search_filter = "{{ getenv "VAULTWARDEN_LDAP_SEARCH_FILTER" "(&(objectClass=*)(uid=*))" }}"
ldap_mail_field = "{{ getenv "VAULTWARDEN_LDAP_MAIL_FIELD" "mail" }}" ldap_mail_field = "{{ getenv "VAULTWARDEN_LDAP_MAIL_FIELD" "mail" }}"
ldap_sync_interval_seconds = {{ getenv "VAULTWARDEN_LDAP_SYNC_INTERVAL_SECONDS" "60" }} ldap_sync_interval_seconds = {{ getenv "VAULTWARDEN_LDAP_SYNC_INTERVAL_SECONDS" "60" }}
ldap_sync_loop = {{ getenv "VAULTWARDEN_LDAP_SYNC_LOOP" "true" | conv.Bool }} ldap_sync_loop = {{ getenv "VAULTWARDEN_LDAP_SYNC_LOOP" "true" | conv.ToBool }}

View File

@ -27,7 +27,7 @@ if [ -n "$VAULTWARDEN_LDAP_VAULTWARDEN_URL" ]; then
fi fi
if [ -n "$VAULTWARDEN_LDAP_HOST" ]; then if [ -n "$VAULTWARDEN_LDAP_HOST" ]; then
WAITFOR_LDAP_SSL=$(/usr/local/bin/gomplate -i '{{ getenv "VAULTWARDEN_LDAP_SSL" "true" | conv.Bool }}') WAITFOR_LDAP_SSL=$(/usr/local/bin/gomplate -i '{{ getenv "VAULTWARDEN_LDAP_SSL" "true" | conv.ToBool }}')
if [ -z "$VAULTWARDEN_LDAP_PORT" ]; then if [ -z "$VAULTWARDEN_LDAP_PORT" ]; then
[ "$WAITFOR_LDAP_SSL" = true ] && VAULTWARDEN_LDAP_PORT=636 || VAULTWARDEN_LDAP_PORT=389 [ "$WAITFOR_LDAP_SSL" = true ] && VAULTWARDEN_LDAP_PORT=636 || VAULTWARDEN_LDAP_PORT=389