dataset/seed/openldap/templates/slapd.service

17 lines
869 B
SYSTEMD
Raw Normal View History

2022-03-08 19:42:28 +01:00
[Service]
ExecStartPre=
2022-12-25 17:08:52 +01:00
ExecStartPre=-/usr/sbin/slapadd -F /etc/openldap/slapd.d -v -b cn=config -l /etc/ldap/secrets/config.ldif
2023-06-23 08:12:05 +02:00
{% for schema in ldap_schemas %}
ExecStartPre=-/usr/sbin/slapadd -F /etc/openldap/slapd.d -v -b cn=config -l {{ schema }}
{% endfor %}
2022-12-25 17:08:52 +01:00
ExecStartPre=-/usr/sbin/slapadd -F /etc/openldap/slapd.d -c -v -l /etc/ldap/secrets/users.ldif
2022-03-08 19:42:28 +01:00
User=ldap
Group=ldap
ExecStart=
# remove none tls port
ExecStart=+/usr/sbin/slapd -u ldap -h ldaps:///
#waiting for ldap server...
2023-06-23 08:12:05 +02:00
ExecStartPost=/usr/bin/timeout 90 bash -c 'while ! 3<> /dev/tcp/localhost/636; do sleep 1; done'
ExecStartPost=+-/usr/bin/ldapmodify -D {{ ldap_user }} -y /usr/local/lib/secrets/admin_ldap.pwd -v -f /usr/local/lib/secrets/config_acl.ldif
ExecStartPost=+-/usr/bin/ldapmodify -D {{ ldap_user }} -y /usr/local/lib/secrets/admin_ldap.pwd -v -f /usr/local/lib/secrets/users_mod.ldif