I've installed nut and nut-client 2.8.0 on my systemd server (had some
fun with the 2.8.0-1.el8 packages not correctly generating /var/run
due to an incorrect /usr/lib/tmpfiles.d entry (nut-common.conf instead
of nut-client.conf and pointing to /var/run/nut/nut) but that's a
story for another day - I worked around that).
My question is about systemd service files...
The 2.8.0 service files are different from 2.7.4 - and while I have
read the 2.8.0 documentation I am not clear on which of the various
.service and .target files should be set to autostart.
Immediately after install systemd had nut like this:
[root@emp80 ~]# systemctl list-unit-files | grep -i nut
nut-driver-enumerator.path disabled
nut-driver-enumerator.service disabled
nut-driver@.service disabled
nut-monitor.service disabled
nut-server.service disabled
nut-driver.target disabled
nut.target disabled
In 2.8.0 I have a configured ups.conf. I have not created or edited
any .service or .target unit-files, all are as standard. Editing
ups.conf resulted in nut-driver@eaton5sx.service correctly, and
systemctl start nut-driver@eaton5sx.service runs fine, as does
'upsdrvctl start'.
Then starting nut-server.service and nut-monitor.service gets me to a
fully operational state. After a reboot, nothing was auto-started, but
manually starting everything (driver, server, monitor) worked - so PID
files/locations are OK.
I'm now trying to work out what to "enable" for systemd autostart on
boot, and having mixed results.
I'm setup as follows at the moment, but am not sure if this is correct
for what should be enabled for autostart on reboot as sometimes the
driver does not start and has to be manually triggered into life.
[root@emp80 ~]# systemctl list-unit-files | grep -i nut
nut-driver-enumerator.path disabled
nut-driver-enumerator.service disabled
nut-driver@.service disabled
nut-monitor.service disabled
nut-server.service disabled
nut-driver.target enabled
nut.target enabled
What should be set to start with "systemctl enable ...."? Can someone
with a fully working systemd 2.8.0 setup please tell me what they have?
Thanks
Simon
--
Simon Wilson
M: 0400 12 11 16
_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser