Hardware Reference
In-Depth Information
First, perform a traditional installation:
apt-get install nut
The setup procedure then involves creating four configuration files in your /etc/nut directory:
# /etc/nut/ups.conf
[apc]
driver = usbhid-ups
port = auto
This references the appropriate driver for your UPS unit, 7 which I have called apc here:
# /etc/nut/upsd.conf
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32
ACCEPT localhost
REJECT all
This indicates that only the local machine should react to UPS messages, which eliminates hackers spoofing a
UPS failure and causing your machine to switch off. Then set up a basic user that has access to daemon by doing this:
# /etc/nut/upsd.users
[local_mon]
password = mypasswordhere
allowfrom = localhost
upsmon master
You can then configure the daemon by specifying its process commands:
# /etc/nut/upsmon.conf
MONITOR apc@localhost 1 local_mon mypasswordhere master
POWERDOWNFLAG /etc/killpower
SHUTDOWNCMD "/sbin/shutdown -h now"
You can set up multiple users if you will be monitoring the UPS from alternate machines, but it's not necessary, as
you'll probably create a web page holding this information.
You can then fix the permissions for the files (as there's a password in there you'd probably rather the world
didn't see):
sudo chown root:nut /etc/nut/*
sudo chmod 640 /etc/nut/*
and start the daemon running, like so:
upsdrvctl start
/etc/init.d/nut start
4HECOMPATIBILITYLISTISAVAILABLEAT www.networkupstools.org/compat/stable.html
Search WWH ::




Custom Search