[Nut-upsuser] Another New User Question - Notify Script Not Running

Roger Price roger at rogerprice.org
Thu Jul 18 23:38:24 BST 2019


On Thu, 18 Jul 2019, David White wrote:

> NOTIFYCMD? /home/android/nutShutdown.sh
> NOTIFYMSG? ONBATT? "USP %s on battery"
> NOTIFYFLAG? ONBATT? EXEC

Perhaps before plunging into upsmon debugging, and debugging your own custom 
NOTIFYCMD script, you could get the basic notifications of upsmon working using 
more complete NOTIFYFLAG and NOTIFYMSG declarations covering all situations. You 
will then have a clearer view in the log of what is happening.  Why don't you 
have the SYSLOG option on the NOTIFYFLAG ONBATT declaration?

Can you call the nutShutdown.sh script from the command line as the user 
running upsmon?

If you need a custom Shutdown Plan, then why not use upssched?

I would also suggest increasing the log output of your script to identify and 
present more clearly what is happening in the script, for example by including 
the UPS status and charge. This will help you debug the script.

Roger




More information about the Nut-upsuser mailing list