Setting the NUT (Network UPS Tools) in FreeBSD. Auto power off the server during the discharge UPS

Network UPS Tools – a set of programs that provide an interface for monitoring and management of uninterruptible power supply. NUT may, in case of battery discharge UPS correctly off the server, allows you to monitor the current status of the UPS.

Installing Nut:# Cd / usr / ports / sysutils / nut# Make config

Note the options (interface to connect to the server ups).# Make install clean

After installation you need to find our ups in the list of supported hardware – /usr/local/etc/nut/driver.listThere are ups Ippon Smart Power Pro 1000 and it is connected via com-port.

Notes:1. I note that with the help of nut you can not set the time after which the server will turn off after the fall of electricity. That is bespereboynik first discharged and then give the command to shut down.2. Rights of access to the port that is connected to the UPS must be for the user uucp and group wheel. Change the owner of the port / device you can:# Chown uucp: wheel / dev / ttyu0

After rebooting, these rights will fly and it will not work. Therefore, add the following lines to /usr/local/etc/rc.d/nut after the #! / Bin / sh:chown uucp: wheel / dev / ttyu0