Walter Dnes wrote: > On Sun, Aug 18, 2024 at 04:06:41PM -0500, Dale wrote >> I think I get what your script does. When Nut sees onbatt then it >> executes your script because of the NOTIFYCMD option. The script then >> waits 60 seconds then executes what is under 'done'. >> Could one change the 60 seconds to say 300 seconds? > At the top of the script is the line "counter=60". Change that to > "counter=300". The script does a "sleep 1" (1 second delay) each pass > through the "while" loop. Note that it also checks... > > if echo "$output" | grep -q "OB" > > ...on each pass through the loop. ***IF AC POWER IS RESTORED BEFORE THE > COUNTDOWN FINISHES*** the battery is no longer in use and the "if" > returns false. It then executes the "else" portion of the loop on that > pass and exits the script without taking any action. I don't want to > hibernate or shutdown for a short 5-second power blip. >
That's what I was thinking. I just wish Nut had a easy way to do this. It would make things a lot simpler. Thanks. Time to update backups. Dale :-) :-)