> > > > MONITOR dummy at artu 1 user pass master >> SHUTDOWNCMD "/sbin/shutdown -h +0" >> NOTIFYCMD /usr/local/bin/upssched-script >> > > Hi, As far as I can see, what you are getting in syslog corresponds > correctly to what you have specified. You have specified that upsmon is to > call upssched-script _directly_. This means that the argument to the > script call will be the NOTIFYMSG value. But in upssched-script you are > testing for the notifytype, e.g. ONBATT. > > Did you want that, or did you want NOTIFYCMD to point to upssched? > > If I may throw away modesty, see chapter 4 in > http://rogerprice.org/NUT/ConfigExamples.A5.pdf which has a diagram and a > fully worked example. > > Roger > > >> ?Hi Roger,thanks for your reply. My intention is to set my email script when some event occurs (on battery and so on). in chapter 4.2 you mention The NOTIFY events detected by upsmon and flagged as EXEC in upsmon.conf become events for upssched when NOTIFYCMD points to upssched. ?I would like that NOTIFYCMD points to upssched?. Thank you lots, Andrea ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170703/95892d07/attachment-0001.html>
On Jul 3, 2017, at 11:06 AM, Andrea de Lutti <adelutti at gmail.com> wrote:> > ?I would like that NOTIFYCMD points to upssched?. >If I understand correctly, Roger is pointing out that your configuration is confusing upssched and upssched-script. Since you are using Ubuntu, upsmon.conf should contain "NOTIFYCMD /sbin/upssched". Similarly, upssched.conf should contain "CMDSCRIPT /usr/local/bin/upssched-script". Not sure if those passwords in the script are real, but if they are, you will want to change them now.
On Tue, 4 Jul 2017, Charles Lepple wrote:> Since you are using Ubuntu, upsmon.conf should contain "NOTIFYCMD > /sbin/upssched". Similarly, upssched.conf should contain "CMDSCRIPT > /usr/local/bin/upssched-script".Thanks. I have updated the Configuration Examples to include these Ubuntu specific values. I would very much like to include specifics for other distributions. Roger
Thank you lots! Finally I have everything working! Which are the ups.status I can use with ups in dummy mode? I have seen only OB, LB, OL... thank you Andrea 2017-07-04 19:55 GMT+02:00 Charles Lepple <clepple at gmail.com>:> On Jul 3, 2017, at 11:06 AM, Andrea de Lutti <adelutti at gmail.com> wrote: > > > > ?I would like that NOTIFYCMD points to upssched?. > > > If I understand correctly, Roger is pointing out that your configuration > is confusing upssched and upssched-script. > > Since you are using Ubuntu, upsmon.conf should contain "NOTIFYCMD > /sbin/upssched". Similarly, upssched.conf should contain "CMDSCRIPT > /usr/local/bin/upssched-script". > > Not sure if those passwords in the script are real, but if they are, you > will want to change them now. > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170705/7111dd2f/attachment.html>