<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<div><br></div><div>I am unable to get upssched working correctly as my UPS calls low battery too late and there is no way to change it.</div><div><br></div><div>I am running Nut 2.7.3 on Ubuntu 14.04</div><div><br></div><div>I have made this script, called /sbin/upssched-cmd.sh</div><div><br></div><div><div>#!/bin/sh</div><div> case $1 in</div><div> onbatt)</div><div> /sbin/upsmon -c fsd;;</div><div> *)</div><div> echo "shutdown implemented";;</div><div> esac</div></div><div><br></div><div>I am trying to run the script manually to break down my issues. All that happens when I run the script is I get the echo script but no shutdown, effectively the script doesn't seem to run the command /sbin/upsmon -c fsd . I have run this command from the command line and the system shuts down as expected.:</div><div><br></div><div><div>root@unifi:/sbin# ./upssched-cmd.sh</div><div>shutdown implemented</div></div><div><br></div><div><div>Command run manually works just fine:</div><div><br></div><div>root@unifi:/# upsmon -c fsd</div><div>Network UPS Tools upsmon 2.7.3</div><div><br></div><div>Broadcast Message from nut@unifi</div><div> (somewhere) at 13:40 ...</div><div><br></div><div>Executing automatic power-fail shutdown</div><div><br></div><div><br></div><div><br></div><div>Broadcast Message from nut@unifi</div><div> (somewhere) at 13:40 ...</div><div><br></div><div>Auto logout and shutdown proceeding</div><div><br></div><div><br></div><div>Broadcast message from root@unifi</div><div> (unknown) at 13:40 ...</div><div><br></div><div>The system is going down for reboot NOW!</div></div><div><br></div><div><br></div><div>Permissions are:</div><div><br></div><div><div>root@unifi:/sbin# ls -la upssched-cmd.sh</div><div>-rwxrwx--- 1 root root 107 Apr 27 13:33 upssched-cmd.sh</div></div><div><br></div><div>I have the command pointing at the correct place:</div><div><br></div><div><div>unifi@unifi:~$ command -v upsmon</div><div>/sbin/upsmon</div></div><div><br></div><div>Any help appreciated. All I am looking to do is shutdown this master upsd and send shutdown requests to 2 other slaves after 10 mins of the UPS going onto battery.</div><div><br></div><div>Cheers,</div><div><br></div><div>James</div><div><br></div><div><br></div><div><br></div> </div></body>
</html>