...
Code Block |
---|
$ sudo apt-get install nut |
Setup
...
Configuring the UPS
Code Block |
---|
$ vi /etc/nut/ups.conf |
...
Set Mode=netserver
Code Block |
---|
MODE=netserver |
...
Configuring UPS Monitor
Code Block |
---|
$ vi /etc/nut/upsmon.conf |
...
Code Block |
---|
MONITOR qnapups@localhost 1 upsmon 123456 master FINALDELAY 500300 |
Here we are setting FINALDELAY to a very bit larger value large value in an attempt to keep the master up until the battery is depleted. We are doing this to ensure that the low power consuming equipment (router, modem, raspberry pi) can run for as long as possible.
FINALDELAY seconds
When running in master mode, upsmon waits this long after sending the NOTIFY_SHUTDOWN to warn the users. After the timer elapses, it then runs your SHUTDOWNCMD. By default this is set to 5 seconds.
If you need to let your users do something in between those events, increase this number. Remember, at this point your UPS battery is almost depleted, so don’t make this too big.
Alternatively, you can set this very low so you don’t wait around when it’s time to shut down. Some UPSes don’t give much warning for low battery and will require a value of 0 here for a safe shutdown.
Verify Hardware Config
Code Block |
---|
$ sudo upsdrvctl start |
...