Am 24.08.2014 19:09, schrieb Andreas B. Mundt:
> X-Debbugs-CC: [email protected]
> 
> Hi,
> 
> I did some experiments with slapd.service and krb5-kdc.service files.
> Note that this is my very first attempt working with systemd, so don't
> expect much.  However, perhaps the following "works for me now"-result
> is a useful starting point when implementing a thorough solution:
> 
> root@mainserver:~# cat /etc/systemd/system/slapd.service
> [Unit]
> Description=OpenLDAP standalone server (Lightweight Directory Access Protocol)
> After=syslog.target

syslog.target is deprecated and no longer necessary. The main syslog
implementations support socket activation nowadays. So the
After=syslog.target line should be dropped

> Wants=remote-fs.target

Why do you need that?

> [Service]
> Type=forking
> PIDFile=/var/run/slapd/slapd.pid
> EnvironmentFile=-/etc/default/slapd
> ExecStartPre=-/bin/mkdir /var/run/slapd
> ExecStartPre=-/bin/chown ${SLAPD_USER}:${SLAPD_GROUP} /var/run/slapd

Please consider adding a tmpfiles snippet for creating the runtime
directory. Or do you really need a configurable slapd user/group?

> ExecStart=/usr/sbin/slapd -u ${SLAPD_USER} -g ${SLAPD_GROUP} -h 
> ${SLAPD_SERVICES} $SLAPD_OPTIONS
> 
> [Install]
> WantedBy=multi-user.target
> 
> 
> root@mainserver:~# cat /etc/systemd/system/krb5-kdc.service
> [Unit]
> Description=MIT Kerberos KDC
> Requires=slapd.service
> After=slapd.service

From what I understood so far, krb5-kdc does *not* have a strict
dependency on slapd. So Requires=slapd.service looks wrong.

> [Service]
> Type=forking
> EnvironmentFile=-/etc/default/krb5-kdc
> ExecStart=/usr/sbin/krb5kdc

You are loading the EnvironmentFile but then don't use any env vars from it.



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to