16 lines
872 B
Desktop File
16 lines
872 B
Desktop File
[Service]
|
|
ExecStartPre=
|
|
ExecStartPre=-/usr/sbin/slapadd -F /etc/openldap/slapd.d -v -b cn=config -l /etc/ldap/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 /etc/ldap/secrets/users.ldif
|
|
User=ldap
|
|
Group=ldap
|
|
ExecStart=
|
|
# remove none tls port
|
|
ExecStart=+/usr/sbin/slapd -u ldap -h ldaps:///
|
|
#waiting for ldap server...
|
|
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
|