Christi Scarborough wrote:
> Jun 14 11:29:51 yaga systemd[1]: /lib/systemd/system/nut-monitor.service:6: 
> PIDFile= references path below legacy directory /var/run/, updating 
> /var/run/nut/upsmon.pid → /run/nut/upsmon.pid; please update the unit file 
> accordingly.
> Jun 14 11:32:46 yaga systemd[1]: Starting Network UPS Tools - power device 
> monitor and shutdown controller...
> Jun 14 11:32:46 yaga upsmon[34188]: fopen /var/run/nut/upsmon.pid: No such 
> file or directory
> Jun 14 11:32:46 yaga upsmon[34188]: UPS: <upsid> (slave) (power value 1)
> Jun 14 11:32:46 yaga upsmon[34188]: Using power down flag file /etc/killpower
> Jun 14 11:32:46 yaga systemd[1]: nut-monitor.service: Can't open PID file 
> /run/nut/upsmon.pid (yet?) after start: No such file or directory
> Jun 14 11:32:46 yaga upsmon[34195]: Startup successful
> Jun 14 11:32:46 yaga systemd[1]: Started Network UPS Tools - power device 
> monitor and shutdown controller.
> Jun 14 11:32:46 yaga upsmon[34196]: Init SSL without certificate database
> 
> Although the app is working, both errors (the first and 6th lines above are 
> of concern, as I am uncertain whether they will cause unpredictable behaviour.

I see this also, on a Debian 11 host with nut-client installed.
The nut server is on a different host.
I tried a couple of variations of this, but it didn't help:

    # /etc/systemd/system/nut-monitor.service.d/override.conf

    # Trying to fix these warnings:
    #    nut-monitor.service: Can't open PID file /run/nut/upsmon.pid (yet?) 
after start: Operation not permitted
    #    nut-monitor.service: Supervising process 1287240 which is not our 
child. We'll most likely not notice when it exits.
    [Service]
    RuntimeDirectory=nut
    # Because /run/nut is shared by several nut units,
    # do not erase it when THIS one ends.
    # This might not be necessary, but
    # I cannot easily tell, because
    # I only run nut-monitor on this host!
    RuntimeDirectoryPreserve=true
    # Sigh, because upsmon starts as root then drops privs,
    # it still fails to write to root:root /run/nut?
    # Start upsmon as root:nut and make /run/nut root:nut.
    # Maybe that will be enough to make thus STFU?
    Group=nut

Reply via email to