For me on Ubuntu 16.04, `apcupsd` doesn't start when using `sudo systemctl start apcupsd` or `sudo service apcupsd start`.
It didn't appear in `ps aux | grep apc` and I got:
% systemctl status apcupsd
● apcupsd.service - LSB: Starts apcupsd daemon
Loaded: loaded (/etc/init.d/apcupsd; bad; vendor preset: enabled)
Active: active (exited) since Wed 2018-01-10 22:21:00 CET; 34min ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0
Memory: 0B
CPU: 0
Note the `active (exited)` and no processes shown.
I suspect that in this case the `systemd-sysv-generator` messed up and cannot correctly start this SysV-Init unit. So basically, the systemd service seems broken in this version of Ubuntu.
I fixed it by just installing a proper systemd unit using:
For me on Ubuntu 16.04, `apcupsd` doesn't start when using `sudo systemctl start apcupsd` or `sudo service apcupsd start`.
It didn't appear in `ps aux | grep apc` and I got:
% systemctl status apcupsd d/apcupsd; bad; vendor preset: enabled) sysv-generator( 8)
● apcupsd.service - LSB: Starts apcupsd daemon
Loaded: loaded (/etc/init.
Active: active (exited) since Wed 2018-01-10 22:21:00 CET; 34min ago
Docs: man:systemd-
Tasks: 0
Memory: 0B
CPU: 0
Note the `active (exited)` and no processes shown.
I suspect that in this case the `systemd- sysv-generator` messed up and cannot correctly start this SysV-Init unit. So basically, the systemd service seems broken in this version of Ubuntu.
I fixed it by just installing a proper systemd unit using:
curl https:/ /raw.githubuser content. com/johannbg/ systemd- units/4c7ac61a6 bf390a4899954f7 8820d49587b360d 7/projects/ apcupsd/ service/ apcupsd. service | sudo tee /etc/systemd/ system/ apcupsd. service
sudo systemctl daemon-reload
After that, I can `sudo service apcupsd start` all fine.
That service file has contents
[Unit]
Description=APC UPS Power Control Daemon for Linux
[Service] e=-/usr/ bin/rm -f /etc/apcupsd/ powerfail /usr/sbin/ apcupsd -b -f /etc/apcupsd/ apcupsd. conf
ExecStartPr
ExecStart=
[Install] multi-user. target
WantedBy=
I don't know if upstream debian has the same problem, but the same fix would work there.