[Nut-upsuser] upssched setup

James Hammond james_r_hammond at hotmail.com
Mon Apr 27 12:42:36 UTC 2015


Hi,
I am unable to get upssched working correctly as my UPS calls low battery too late and there is no way to change it.
I am running Nut 2.7.3 on Ubuntu 14.04
I have made this script, called /sbin/upssched-cmd.sh
#!/bin/sh case $1 in   onbatt)     /sbin/upsmon -c fsd;;   *)     echo "shutdown implemented";; esac
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.:
root at unifi:/sbin# ./upssched-cmd.shshutdown implemented
Command run manually works just fine:
root at unifi:/# upsmon -c fsdNetwork UPS Tools upsmon 2.7.3
Broadcast Message from nut at unifi        (somewhere) at 13:40 ...
Executing automatic power-fail shutdown


Broadcast Message from nut at unifi        (somewhere) at 13:40 ...
Auto logout and shutdown proceeding

Broadcast message from root at unifi        (unknown) at 13:40 ...
The system is going down for reboot NOW!

Permissions are:
root at unifi:/sbin# ls -la upssched-cmd.sh-rwxrwx--- 1 root root 107 Apr 27 13:33 upssched-cmd.sh
I have the command pointing at the correct place:
unifi at unifi:~$ command -v upsmon/sbin/upsmon
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.
Cheers,
James


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150427/ad115253/attachment.html>


More information about the Nut-upsuser mailing list