Package: nslcd
Version: 0.9.7-2+deb9u1
Severity: normal

I have one proposal to solve the problem for add systemd .service file, which
is the following:

Create one file on the directory "/lib/systemd/system/", with the name yo want.

nano /lib/systemd/system/nslcd.service

Add the following lines to be displayed:

[Unit]
Description=NSLCD Systemd Unit Debian
After=multi-user.target

[Service]
ExecStart=/usr/sbin/nslcd
Restart=on-failure
KillSignal=SIGQUIT
Type=forking
StandardError=syslog
StandardOutput=syslog
WorkingDirectory=/var/run/nslcd
NotifyAccess=all
RuntimeDirectory=nslcd

[Install]
WantedBy=multi-user.target

Run the following commands for activate the service nslcd in systemd:

root@debian-systemd:/home/vagrant# systemctl enable nslcd.service
root@debian-systemd:/home/vagrant# systemctl daemon-reload
root@debian-systemd:/home/vagrant# systemctl start nslcd.service

Show the status of the service nslcd:

root@debian-systemd:/home/vagrant# systemctl status nslcd.service
● nslcd.service - NSLCD Systemd Unit Debian
   Loaded: loaded (/lib/systemd/system/nslcd.service; enabled; vendor preset:
enabled)
   Active: active (running) since Tue 2018-12-18 12:19:41 GMT; 8min ago
  Process: 422 ExecStart=/usr/sbin/nslcd (code=exited, status=0/SUCCESS)
 Main PID: 424 (nslcd)
    Tasks: 6 (limit: 4915)
   CGroup: /system.slice/nslcd.service
           └─424 /usr/sbin/nslcd

Dec 18 12:19:41 debian-systemd systemd[1]: nslcd.service: Failed with result
'exit-code'.
Dec 18 12:19:41 debian-systemd systemd[1]: Starting NSLCD Systemd Unit
Debian...
Dec 18 12:19:41 debian-systemd nslcd[424]: version 0.9.7 starting
Dec 18 12:19:41 debian-systemd nslcd[424]: accepting connections
Dec 18 12:19:41 debian-systemd systemd[1]: Started NSLCD Systemd Unit Debian.
root@debian-systemd:/home/vagrant#

As you can see, the service is running in systemd mode.

If you want to check that the service runs on systemd when you boot your
computer, restart the computer and run the command systemctl status
nslcd.service, and you can see that the service runs on Systemd



-- System Information:
Debian Release: 9.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-8-amd64 (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8), 
LANGUAGE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nslcd depends on:
ii  adduser                3.115
ii  debconf [debconf-2.0]  1.5.61
ii  libc6                  2.24-11+deb9u3
ii  libgssapi-krb5-2       1.15-1+deb9u1
ii  libldap-2.4-2          2.4.44+dfsg-5+deb9u2
ii  lsb-base               9.20161125

Versions of packages nslcd recommends:
ii  bind9-host [host]                              1:9.10.3.dfsg.P4-12.3+deb9u4
ii  ca-certificates                                20161130+nmu1+deb9u1
ii  ldap-utils                                     2.4.44+dfsg-5+deb9u2
pn  libnss-ldapd | libnss-ldap                     <none>
pn  libpam-ldapd | libpam-ldap | libpam-krb5 | li  <none>
pn  nscd                                           <none>
pn  nslcd-utils                                    <none>

Versions of packages nslcd suggests:
pn  kstart  <none>

Reply via email to