Hi again Sabine,<br><br>first, please keep the list cc&#39;ed<br><br><div class="gmail_quote">2010/11/29 sabine GOUDARD <span dir="ltr">&lt;<a href="mailto:sabine.goudard@st-etienne.archi.fr">sabine.goudard@st-etienne.archi.fr</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><p> </p>
<p><span><span>2007 effectively ....<br></span></span></p></blockquote><div>indeed, time passes too quickly!<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<p><span><span>
</span><span>my script: very simple<br>
<br>
</span><span>if I run it manually I have no problem</span></span></p>
<p># write to a specific log file<br>
date=$(date +&quot;%F %T&quot;)<br>
echo &quot;$date &gt;&gt; UPS ALERT, shutting down in a few seconds...&quot; &gt;&gt; /var/log/ups.log</p>
<p></p></blockquote><div>is the above your complete script?<br>if so, you should really add a header like:<br>!#/bin/sh<br><br>don&#39;t forget that this will be run from a program, which may be different that running from a shell.<br>
next, how do you manually call your script? ie &quot;sh myscript.sh&quot; or simply &quot;./myscript.sh&quot;.<br>in other word, are the executable bits set?<br><br>your problem here may be that the NUT user (the one running upsmon) doesn&#39;t have the right privileges to access to your home, where your script is located.<br>
in this case, you should put it in a more neutral location, like /usr/local/bin.<br><br>to get the exact issue, try running upsmon in debug mode (after having stopped it), using &quot;upsmon -DDD&quot;.<br>and generate a power failure. have a look at the same time at upsmon output to see what&#39;s going on...<br>
my guess is that it will be solved by either of the above fix (location, exec bits, header line for interpreter declaration)<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<p>I have restart upsmon after each modification in upsmon.conf</p>
<p> </p>
<p>I also have question about</p>
<p>POWERDOWNFLAG /etc/killpower</p>
<p>When UPS is on LB, it  stops and when it restarts</p>
<p>I don&#39;t have any file killpower ?</p></blockquote><div>this one gets cleared (removed) when upsmon restarts.<br><br>cheers,<br></div></div>Arnaud<br>-- <br>Linux / Unix Expert R&amp;D - Eaton - <a href="http://powerquality.eaton.com" target="_blank">http://powerquality.eaton.com</a><br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/" target="_blank">http://www.networkupstools.org/</a><br>Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>
Free Software Developer - <a href="http://arnaud.quette.free.fr/" target="_blank">http://arnaud.quette.free.fr/</a><br><br>