sthen 484427e60a Note in MESSAGE that the _nut user must have permission to access the
relevant device nodes if using a USB UPS. Suggested by Alexey Suslikov.
2010-06-26 11:11:12 +00:00

15 lines
573 B
Plaintext

Once you have the config files under ${SYSCONFDIR}/nut set up properly, the
following block can be added to your /etc/rc.local file to start nut.
# Start Nut
if [ -x ${PREFIX}/bin/upsdrvctl ]; then
echo -n ' nut'
${PREFIX}/bin/upsdrvctl start > /dev/null 2>&1
${PREFIX}/sbin/upsd > /dev/null 2>&1
${PREFIX}/sbin/upsmon > /dev/null 2>&1
fi
For USB-connected devices, the userid running NUT (normally _nut unless
set otherwise with the -u option) must have write access to the relevant
devices: /dev/usbX to detect the UPS, and /dev/ugenX.XX to control it.