search for: shutdown_script

Displaying 1 result from an estimated 1 matches for "shutdown_script".

Did you mean: _shutdown_scripts
2022 Dec 22
3
NUT & UPS, how to shut down client after 2 min on battery?
...I would like to be on the safest side, and not hope ?low battery? is enough time to shut down. So 2 minutes sound much more safe for paranoid me. 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 have something like this #!/bin/bash poll_interval=5 wait_time=120 counter=0 no_wait_time=60 no_counter=0 while true do output=$(upsc qnapups at 192.168.222.252 ups.status) if echo "$output" | grep -q "O...