feat(ldap): Start and configure only if enabled.

This commit is contained in:
damencho
2024-09-24 11:31:43 -05:00
committed by Дамян Минков
parent ceb4a51a1e
commit 1db83edb25
2 changed files with 8 additions and 2 deletions

View File

@@ -1,2 +1,8 @@
#!/usr/bin/with-contenv bash
exec s6-setuidgid root saslauthd -a ldap -O /etc/saslauthd.conf -c -m /var/run/saslauthd -n 5 -d
if [[ -f /etc/saslauthd.conf ]]; then
exec s6-setuidgid root saslauthd -a ldap -O /etc/saslauthd.conf -c -m /var/run/saslauthd -n 5 -d
else
# if saslauthd should not be started,
# prevent s6 from restarting this script again and again
s6-svc -O /var/run/s6/services/10-saslauthd
fi