Systemd Files#

Templates:

Unit Files:

  • /etc/sysconfig/dirsrv-localhost

Targets:

  • /etc/systemd/system/dirsrv.target.wants

Unit File#

[Unit]
Description=389 Directory Server %i.
PartOf=dirsrv.target
After=chronyd.service ntpd.service network-online.target syslog.target
Before=radiusd.service

[Service]
Type=notify
NotifyAccess=all
TimeoutStartSec=0
TimeoutStopSec=600
EnvironmentFile=/etc/sysconfig/dirsrv
EnvironmentFile=/etc/sysconfig/dirsrv-%i
PIDFile=/var/run/dirsrv/slapd-%i.pid
ExecStartPre=/usr/libexec/dirsrv/ds_systemd_ask_password_acl /etc/dirsrv/slapd-%i/dse.ldif
ExecStart=/usr/sbin/ns-slapd -D /etc/dirsrv/slapd-%i -i /var/run/dirsrv/slapd-%i.pid

# Hardening options:
# PrivateDevices=true
# ProtectSystem=true
# ProtectHome=true
# PrivateTmp=true

# if you need to set other directives e.g. LimitNOFILE=8192
# set them in this file
.include /etc/sysconfig/dirsrv.systemd

[Install]
WantedBy=multi-user.target

Enabling DS Service#

$ systemctl enable dirsrv@localhost.service

See Also#