Files
ergosteurandClaude Opus 5 6df3178cab Add /etc/nut reference configuration
Documents the target state for a host that owns a USB UPS and serves it to a
Synology, for hand-configuring a machine where running
setup-nut-synology.sh is not wanted. Verified byte-identical to what that
script generates, so the two cannot drift.

The [admin] password is the only real secret and ships as CHANGEME in both
files that must agree, upsd.users and the MONITOR line of upsmon.conf.

monuser/secret is committed literally. DSM hardcodes both and cannot be
configured otherwise, so they are published constants rather than
credentials, and the upsmon secondary role only permits reading status and
receiving shutdown notifications.

The example UPS serial is a placeholder rather than the real unit's.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 17:02:19 +00:00

21 lines
522 B
Plaintext

# Install as /etc/nut/upsmon.conf (root:nut, 0640).
#
# This machine owns the UPS, so it is the primary: it shuts down last, after
# secondaries such as the Synology have been told to go.
#
# Replace CHANGEME with the [admin] password from upsd.users. The two must match
# or upsmon cannot log in to its own upsd.
RUN_AS_USER nut
MONITOR ups@localhost 1 admin CHANGEME primary
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
FINALDELAY 5