[Nut-upsuser] Get Nut to Shutdown Computer After a Few Minutes on Battery
Lee Gold
leegold at operamail.com
Fri Aug 9 18:29:28 UTC 2013
Hi,
I tried to do the minimum configuration for Nut. When I stop the on-line
power i get terminal message that I'm on battery power and when I plug
on-line power back in I get a message that I'm back to on-line power. So
things are working/communicating.
What I want is: if it's been on battery power for over 5 minutes the PC
will shutdown. If powers comes on-line again before the 5 min of battery
then things should reset.
I tried many web on-line examples and docs. but can't get it working. I
would be grateful for help. I would like the most simple, understandable
way to do it. I'll cite my files and info below. Thank You so much.
Unbuntu 12.04 Server, nut 2.6.3, Cyperpower CP1500AVRLCD, no slaves
just the one server PC.
nut.conf
MODE=standalone
-----
ups.conf:
[cyberpower-1500]
driver = usbhid-ups
port = auto
-----
upsd.conf:
LISTEN 127.0.0.1 3493
LISTEN ::1 3493
-----
upsd.users:
[monuser]
password = xxxxx
allowfrom = local
upsmon master
-----
re: upsmon.conf
Note: I've attempted many things in upsmon.conf but could not get the
custom
shutdown I want working.
I've taken my attempts out except for the one line I added cited
below..
I do see many configuration lines in this file uncommented by default in
this file, I assume these lines are OK for my system - so the only
change I
have now to this file is the added line cited.
upsmon.conf:
MONITOR cyberpower-1500 at localhost 1 monuser takoma master
-----
re:upssched.conf
CMDSCRIPT /bin/upssched-cmd By default this line was uncommented, I
continue to leave it uncommented - I assume if I use "CMDSCRIPT" again
later on in the file then this line would be overwritten/superseded,
but I'm not sure---just wanted to mention this.
I've tried many things - it didn't work. What do I put in this file? I
thought adding:
PIPEFN /var/run/nut/upssched/upssched.pipe
LOCKFN /var/run/nut/upssched/upssched.lock
AT ONBATT * START-TIMER onbatt 300
AT ONLINE * CANCEL-TIMER onbatt
But I obviously don't know...
upssched.conf: ????
Help appreciated.
-----------------
--
http://www.fastmail.fm - Faster than the air-speed velocity of an
unladen european swallow
More information about the Nut-upsuser
mailing list