Comment 3 for bug 1603609

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
this is part of the following Delta:
        - Disable systemd unit; it does not check nut.conf whether nut is
          configured, and thus fails to start (and the package install). The
          init.d script works well enough for the time being.

Which also causes the script this bug is related to not to be installed.

But the reasoning to disable holds no more true.
By default it starts and exits (as intended)

# systemctl status nut-server
● nut-server.service - Network UPS Tools - power devices information server
   Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2017-11-15 15:36:40 UTC; 8min ago
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/nut-server.service

Nov 15 15:36:40 debian-buster systemd[1]: Starting Network UPS Tools - power devices information server...
Nov 15 15:36:40 debian-buster systemd[1]: Started Network UPS Tools - power devices information server.

If enabled in /etc/nut/nut.conf it works
# systemctl status nut-server
● nut-server.service - Network UPS Tools - power devices information server
   Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2017-11-15 15:45:38 UTC; 2s ago
  Process: 18291 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE)

Nov 15 15:45:38 debian-buster upsd[18291]: listening on 127.0.0.1 port 3493
Nov 15 15:45:38 debian-buster upsd[18291]: listening on ::1 port 3493
(I had no config, so the fail, but it works to consider the conf).