dataset/seed/applicationservice/2022.03.08/openldap/templates/slapd.service

17 lines
880 B
SYSTEMD
Raw Normal View History

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