[Nut-upsuser] Another New User Question - Notify Script Not Running
David White
whitedavidp at yahoo.com
Sat Jul 20 01:37:49 BST 2019
Roger,
Thanks for the idea to add additional items to the notifyflag. That
proved the monitor was indeed working as expected and led me to find
that my script had myriad issues when run under the nut user. All
remedied now.
As I progress, I may well end up migrating to the upssched. As a newbie
I was simply following the documented "simple" way described here
<https://networkupstools.org/docs/user-manual.chunked/ar01s07.html>.
Thanks to all!
On 7/18/2019 3:38 PM, Roger Price wrote:
> 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
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
More information about the Nut-upsuser
mailing list