coreos-home-server/service/lldap/container/run-lldap
Alex Palaistras 4294f1ec9c Add LDAP support with LLDAP
This sets the stage for moving common authentication from IMAP/Dovecot
to LDAP, which allows for more control over user information, as well as
a basic form of RBAC.

No services are currently set up to support LDAP -- support will follow
soon after this commit.
2022-09-19 13:00:31 +01:00

13 lines
459 B
Bash
Executable File

#!/bin/sh
set -eu
# Create configuration file from collected templates.
envsubst < /etc/lldap/config.toml.template > /etc/lldap/config.toml
# Create data directories and correct permissions for data files.
install --owner lldap --group lldap --mode 700 --directory /var/lib/lldap
chown -R lldap:lldap /etc/lldap /var/lib/lldap
# Run entrypoint under specific user.
cd /opt/lldap && gosu lldap /opt/lldap/lldap run --config-file /etc/lldap/config.toml "$@"