Displaying 2 results from an estimated 2 matches for "shutdown_lowbatt".
2023 Jan 12
1
NUT & UPS, how to shut down client after 2 min on battery?
...min to 4 min)
CMDSCRIPT /etc/nut/upssched-execscript.sh
PIPEFN /etc/nut/upssched.pipe
LOCKFN /etc/nut/upssched.lock
AT ONBATT * START-TIMER shutdown_onbatt 240
AT ONBATT * EXECUTE info_onbatt
AT ONLINE * CANCEL-TIMER shutdown_onbatt
AT ONLINE * EXECUTE ups-back-on-power
AT LOWBATT * EXECUTE shutdown_lowbatt
AT REPLBATT * EXECUTE replace_batt
And in /etc/nut/upssched-execscript.sh
#! /bin/sh
case $1 in
shutdown_onbatt)
logger -t upsmon[upssched] "shutdown_onbatt): Triggering shutdown after 4 minutes on battery"
/sbin/shutdown -h +0
;;
shutdown_lowbatt)...
2022 Dec 22
3
NUT & UPS, how to shut down client after 2 min on battery?
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). Like in wiki.ipfire.org - Detailed NUT Configuration<https://wiki.ipfire.org/addons/nut/detailed>