[Nut-upsuser] nut-monitor service fails even though nut-monitor seems to work
Manuel Wolfshant
wolfy at nobugconsulting.ro
Mon Aug 30 23:20:49 BST 2021
On 8/31/21 1:13 AM, Nathan Dehnel via Nut-upsuser wrote:
> I tried removing the -D flags from the command and it still failed.
>
> Here's the unit file:
>
> [Unit]
> Description=Network UPS Tools - power device monitor and shutdown controller
> After=local-fs.target network.target nut-server.service
> OnFailure=systemd-monitor@%n.service
>
> [Service]
> ExecStart=/usr/sbin/upsmon
> PIDFile=/run/upsmon.pid
> Type=forking
>
> [Install]
> WantedBy=multi-user.target
That's what works for me out of the box:
[Unit]
Description=Network UPS Tools - power device monitor and shutdown controller
After=local-fs.target network.target nut-server.service
[Service]
ExecStartPre=-/usr/bin/systemd-tmpfiles --create
/usr/lib/tmpfiles.d/nut-run.conf
ExecStart=/usr/sbin/upsmon -F
Type=simple
[Install]
WantedBy=multi-user.target
More information about the Nut-upsuser
mailing list