aboutsummaryrefslogtreecommitdiff
path: root/system/nut/README.SLACKWARE
blob: a73275956ccf61ed43cd58d1392e7a24a5769ad4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
README.SLACKWARE
Written by V'yacheslav Stetskevych <slava18 dont_spam_me gmail com>

In order to configure Network UPS tools on Slackware you need to rename
or make copies of the sample config files in /etc/nut and edit them
to suit your needs.  See documentation in /usr/doc/nut-* for reference.
As you make your new config files, don't forget to secure them:
	chown root:nut /etc/nut/*.conf /etc/nut/*.users
	chmod 640 /etc/nut/*.conf /etc/nut/*.users

If you are using a serial-connected UPS, be sure to add the nut user to
the 'dialout' group:
	usermod -a -G dialout nut

A startup script /etc/rc.d/rc.ups is provided with this build.
You can add these lines to /etc/rc.d/rc.local to launch it on system start:
	if [ -x /etc/rc.d/rc.ups ]; then
		/etc/rc.d/rc.ups start
	fi

If you have more than one box sitting on the same UPS, you should only use
'start' on the one box that is connected to the device using a signal cable.
On the other boxes, start rc.ups with the 'start_upsmon' parameter to only
monitor the power status (client mode). Configure access permissions on the
server box accordingly.

If you wish for your UPS to turn off it's power during an extended power outage
in order not to drain it's battery completely, you should make two simple edits
to the Slackware shutdown script /etc/rc.d/rc.6 near the end of it.
These are only needed on the server box, one that is connected to the UPS:
1) Insert after the rootfs has been remounted read-only:
	if [ -x /usr/libexec/nut/nut_restart_udev ]; then
		. /usr/libexec/nut/nut_restart_udev
	fi
2) Insert after the genpowerd block and before the actual halt:
	if [ -x /usr/libexec/nut/nut_kill_inverter ]; then
		. /usr/libexec/nut/nut_kill_inverter
	fi

Don't forget to set your motherboard BIOS to automatically turn the machine on
when the power comes back.

Have fun!