[Nut-upsuser] powercom user problem

Martin Ivanov tramni at abv.bg
Wed Aug 16 19:24:41 UTC 2006


So, let me now tell you what I achieved so far:
I modified upsmon.conf like that:

RUN_AS_USER root
MONITOR Inform at localhost 1 root password master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h now"
NOTIFYCMD /usr/local/ups/bin/notifyme
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 0
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYMSG ONLINE "UPS %s is getting line power"
NOTIFYMSG ONBATT "Someone pulled the plug on %s"
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 0

The file notifyme is executable and contains:
echo "The system is shutting down" > /home/marto/opit
/sbin/telinit 0

The upsd.users file is:
[root]
password = 98221026
allowfrom = localhost
upsmon master
actions = SET
instcmds = ALL

With this configuration, whenever I diconnect the UPS from the mains, the system shutsdown normally. I would be glad if there is some way of tellin g the ups itself to power off, after the PC shuts down, but only in case that ups.status has turned "OB BOOST", i.e. only in cas there has been power failure. What I have so far achieved suffices me for now, but things can always get better.
Concisely, I have two questions:
1. How to make the UPS power off after the PC powers off in case of power failure. Of course when there is no power failure, but I issue shutdown command to the system, the UPS must not power off.
2. I would be glad if you suggest me how to improve my configuration files: ups.conf, upsd.conf, upsd.users and upsmon.conf. They work ok now, but I am sure something can be embettered :)

Thank you very much indeed for your responsiveness.
Regards,
Martin 

-----------------------------------------------------------------
http://ide.li/ - портал за българите по света. Статии, новини, форуми, снимки, информация.



More information about the Nut-upsuser mailing list