Connecting a UPS to your Linkstation (USB models)

Installing Network UPS Tools (nut)

NUT is a powerful tool for safely shutting down computers in a power cut. It can make a LS (or other embedded computer) attached to a usb UPS to be as effective as a full server UPS and shut down everything on your LAN if needed.

Edit upsd.users

blah is the password you wish to use. Make sure you use the same one
in upsmon.conf

Edit upsmon.conf

Add this line:

MONITOR myups@localhost 1 monuser blah master

blah is the password, which you should change to your own. Make sure you use the same one in upsd.users

Edit /etc/default/nut

Modify the first few lines to:

# start upsd
START_UPSD=yes

# start upsmon
START_UPSMON=yes

Again: upsd is the server daemon which runs on the computer directly connected to the UPS.
upsmon is the client which polls the server's upsd program to check status and shutdown the pc if needed. In this description server and client are both on the LS -which shuts itself down.

Aug 10 16:04:39 LinkStation upsmon[1613]: UPS myups@localhost on line power

Powering other computers from the UPS

So far it should work before proceeding further -the LS will shut down when the power supply is off and the battery is low. The real power of NUT is that it can turn off lots of PCs including WinXX which are anywhere on your LAN even if they are only connected to "dumb" UPSes.

We need to set up a slave user, allow access from the LAN for it and then set up the clients.
A slave user should shutdown before a master user.

Modifying the upsd server

Some changes on the LS (assumed upsd server):
Modify upsd.users to add the slave user:

[monslave]
password = blah2
allowfrom = mynet
upsmon slave

"blah2" is another password to change to your own choice

Edit the upsd.conf to define the "mynet" group of IP addresses to have a bit as per: