Re: [Nut-upsuser] NUT & UPS, how to shut down client after 2 min on battery?

2023-01-12 Thread Jim Klimov via Nut-upsuser
Cheers, At least a few things that DO NOT seem right upon quick reading are: * upsmon.conf: RUN_AS_USER root Should not normally be required: when started as root, upsmon splits into unprivileged process for most of the work and leaves the shutdown handler running as root; with this setting

Re: [Nut-upsuser] NUT & UPS, how to shut down client after 2 min on battery?

2023-01-12 Thread Rafael Reinoso via Nut-upsuser
Now I have this in /etc/nut/upsmon.conf (my QNAP NAS wants admin and 123456 or not working) RUN_AS_USER root MONITOR qnapups@localhost 1 admin 123456 master MONITOR qnapups@192.168.222.252 3493 admin 123456 slave MINSUPPLIES 1 SHUTDOWNCMD "/sbin/shutdown -h +0" POLLFREQ 5 POLLFREQALERT 5

Re: [Nut-upsuser] NUT & UPS, how to shut down client after 2 min on battery?

2022-12-30 Thread Matt Kinni via Nut-upsuser
On 2022-12-22 05:47, Rafael Reinoso via Nut-upsuser wrote: I do not know much about NUT, but after some Googling, one idea I have is to in /etc/nut/upsmon.conf on client change to this |NOTIFYCMD "/etc/nut/shutdown_script.sh" NOTIFYFLAG ONBATT EXEC | And then in /etc/nut/shutdown_script.sh

Re: [Nut-upsuser] NUT & UPS, how to shut down client after 2 min on battery?

2022-12-22 Thread Roger Price
On Thu, 22 Dec 2022, Rafael Reinoso via Nut-upsuser wrote: Some systems I have take some time to shut down, so I would like them to shut down if the UPS have been on battery for 2 minutes. Have a look at chapter 7 of the NUT Configuration Examples at

[Nut-upsuser] NUT & UPS, how to shut down client after 2 min on battery?

2022-12-22 Thread Rafael Reinoso via Nut-upsuser
Hi! Some systems I have take some time to shut down, so I would like them to shut down if the UPS have been on battery for 2 minutes. Internet has told me that SHUTDOWNCMD “/sbin/shutdown -h +0” in /etc/nut/upsmon.conf will execute when the UPS is both OB (on battery) and LB (Low battery).