Hello there, I hope I'm not asking a repetitive question here.
I've been using Artix for about a year now, so I'm still learning the ins and outs.
Recently I bought a Uninterruptible Power Supply for my home server since thunderstorms caused multiple power outages in the last few weeks.
On this system I run Artix with kernel 5.12.12 and runit.
Now to use this UPS, I connected it via USB and installed the nut package from the arch community repo, since it's not available in the artix ones.
Then I used the wiki page to configure it, with the usbhid-ups driver.
All went well until the "upsd configuration" section. Here you should enable nut-server.service, but of course that's not simply possible with runit.
In /usr/lib/systemd/system there are now three services: "nut-driver.service" "nut-monitor.service" and "nut-server.service".
nut-server and nut-monitor are explicitly mentioned in the wiki and I assume nut-driver is important as well.
Is there a way to "port" these service files for use with runit, or is it impossible to run such a program anyway?
I'll put the content of these three files below.
Thanks in advance.
cat nut-driver.service
[Unit]
Description=Network UPS Tools - power device driver controller
After=local-fs.target network.target
StopWhenUnneeded=yes
[Service]
ExecStart=/usr/bin/upsdrvctl start
ExecStop=/usr/bin/upsdrvctl stop
Type=forking
cat nut-monitor.service
[Unit]
Description=Network UPS Tools - power device monitor and shutdown controller
After=local-fs.target network.target nut-server.service
[Service]
ExecStart=/usr/bin/upsmon
PIDFile=/run/nut/upsmon.pid
Type=forking
[Install]
WantedBy=multi-user.target
cat nut-server.service
[Unit]
Description=Network UPS Tools - power devices information server
After=local-fs.target network.target nut-driver.service
# We don't Require drivers to be successfully started! This would be
# a change of behavior compared to init SysV, and could prevent from
# accessing successfully started, at least to audit a system.
Wants=nut-driver.service
Before=nut-monitor.service
[Service]
ExecStart=/usr/bin/upsd
Type=forking
[Install]
WantedBy=multi-user.target