[Nut-upsuser] Low Battery False Alarms

Roger Price roger at rogerprice.org
Sun May 26 10:26:31 BST 2019


On Sat, 25 May 2019, Mike Dillinger wrote:

How about something like this:

>       case $OPTION in
>           lowbatt)
                 MSG="NUT upssched \"lowbatt\" confirmation begins. Waiting for 5 seconds"
                 echo "$SCRIPT: $MSG"
                 logger -t $SCRIPT "$MSG"
                 Wait for 5 seconds
                 CHARGE=$( upsc <myups> battery.charge )
                 if CHARGE ok then exit from script
>               MSG="NUT upssched \"lowbatt\" sequence start: UPS Low Battery; Begin shutting down clients"
>               echo "$SCRIPT: $MSG"
>               logger -t $SCRIPT "$MSG"
>               /etc/nut/scripts/shutdown-control &
>               MSG="NUT upssched \"lowbatt\" sequence initiated"
>               echo "$SCRIPT: $MSG"
>               logger -t $SCRIPT "$MSG"
>               ;;
         ...
>       esac
>       exit 0


More information about the Nut-upsuser mailing list