<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
MONITOR dummy@artu 1 user pass master<br>
SHUTDOWNCMD "/sbin/shutdown -h +0"<br>
NOTIFYCMD /usr/local/bin/upssched-script<br>
</blockquote>
<br></span>
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.<br>
<br>
Did you want that, or did you want NOTIFYCMD to point to upssched?<br>
<br>
If I may throw away modesty, see chapter 4 in <a href="http://rogerprice.org/NUT/ConfigExamples.A5.pdf" rel="noreferrer" target="_blank">http://rogerprice.org/NUT/Conf<wbr>igExamples.A5.pdf</a> which has a diagram and a fully worked example.<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
Roger</font></span><span class="gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br></blockquote></span></blockquote><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">​Hi Roger,</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">thanks for your reply.</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">My intention is to set my email script when some event occurs (on battery and so on).</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">in chapter 4.2 you mention</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">The NOTIFY events detected by upsmon and flagged as EXEC in upsmon.conf become events for
upssched when NOTIFYCMD points to upssched.<br></div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">​I would like that NOTIFYCMD points to upssched​. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thank you lots,</div><div class="gmail_default" style="font-family:verdana,sans-serif">Andrea</div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">​</div> </div></div></div></div>