Philippe Andersson I think tried to respond on this thread but all I see is your corporate email signature?
I did some more troubleshooting tonight. TL;DR at the end. First, confirmed that NOTIFYCMD is in fact firing. So I changed it to: NOTIFYCMD logger "NOTIFYCMD FIRED!" followed by: sudo service nut-client restart and that message does show up in /var/log/messages when I pull the plug on the ups, so something is happening. Next I tried changing the command to a bash script: NOTIFYCMD /etc/nut/call-ups-log.sh Inside that bash script, I just have this: #!/bin/sh logger "called call-ups-log.sh" /home/pi/Documents/scripts/ups-log.py "$*" "called call-ups-log.sh" shows up in /var/log/messages as expected, but the python script still isn't getting called. I thought maybe it was something to do with the directory Documents/scripts/ so I moved it to /etc/nut/ and reconfigured everything, same result. But at this point the bash script and python script are in the same directory with the same owner and permissions. TL;DR: I think at this point I've eliminated permissions problems, but there's something that is preventing NUT NOTIFYCMD from calling a python script properly. The python script I'm using is here, it's working fine when I call it from a command line: https://pastebin.com/AXi67sV6 Thanks for all the help and sorry for the text brick! Moved call-ups-log.sh to Documents/scripts, and all of a sudden it's not working anymore either. Okay, so maybe it's the directory. On Tue, Feb 11, 2020 at 6:56 AM <[email protected]> wrote: > Send Nut-upsuser mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Nut-upsuser digest..." > > > Today's Topics: > > 1. Re: NOTIFYCMD not running (Philippe Andersson) > 2. Re: NOTIFYCMD not running (Philippe Andersson) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 11 Feb 2020 14:19:58 +0100 > From: Philippe Andersson <[email protected]> > To: <[email protected]> > Subject: Re: [Nut-upsuser] NOTIFYCMD not running > Message-ID: <[email protected]> > Content-Type: text/plain; charset="utf-8" > > > Disclaimer | Use of IBA e-communication< > https://iba-worldwide.com/disclaimer> > > The contents of this e-mail message and any attachments are intended > solely for the recipient (s) named above. This communication is intended to > be and to remain confidential and may be protected by intellectual property > rights. Any use of the information contained herein (including but not > limited to, total or partial reproduction, communication or distribution of > any form) by persons other than the designated recipient(s) is prohibited. > Please notify the sender immediately by e-mail if you have received this > e-mail by mistake and delete this e-mail from your system. E-mail > transmission cannot be guaranteed to be secure or error-free. Ion Beam > Applications does not accept liability for any such errors. Thank you for > your cooperation. > -------------- next part -------------- > An embedded message was scrubbed... > From: Philippe Andersson <[email protected]> > Subject: Re: [Nut-upsuser] NOTIFYCMD not running > Date: Tue, 11 Feb 2020 14:19:58 +0100 > Size: 16341 > URL: < > http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200211/44658975/attachment-0001.mht > > > > ------------------------------ > > Message: 2 > Date: Tue, 11 Feb 2020 15:41:50 +0100 > From: Philippe Andersson <[email protected]> > To: <[email protected]> > Subject: Re: [Nut-upsuser] NOTIFYCMD not running > Message-ID: <[email protected]> > Content-Type: text/plain; charset="utf-8" > > > Disclaimer | Use of IBA e-communication< > https://iba-worldwide.com/disclaimer> > > The contents of this e-mail message and any attachments are intended > solely for the recipient (s) named above. This communication is intended to > be and to remain confidential and may be protected by intellectual property > rights. Any use of the information contained herein (including but not > limited to, total or partial reproduction, communication or distribution of > any form) by persons other than the designated recipient(s) is prohibited. > Please notify the sender immediately by e-mail if you have received this > e-mail by mistake and delete this e-mail from your system. E-mail > transmission cannot be guaranteed to be secure or error-free. Ion Beam > Applications does not accept liability for any such errors. Thank you for > your cooperation. > -------------- next part -------------- > An embedded message was scrubbed... > From: Philippe Andersson <[email protected]> > Subject: Re: [Nut-upsuser] NOTIFYCMD not running > Date: Tue, 11 Feb 2020 15:41:50 +0100 > Size: 32550 > URL: < > http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200211/4a868e92/attachment.mht > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Nut-upsuser mailing list > [email protected] > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser > > ------------------------------ > > End of Nut-upsuser Digest, Vol 176, Issue 6 > ******************************************* >
_______________________________________________ Nut-upsuser mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
