[Nut-upsuser] upsdrvctl shutdown isn't powering down UPS

Ken Brubacher ken at innovative.ink
Tue Dec 7 20:30:47 GMT 2021


Working to get NUT setup in XCP NG v8 dom0
Everything is working except my UPS won't power down after the system shuts down. I've tried two different shutdown scripts in my init shutdown and neither seems to be working.

cat /etc/ups/upsmon.conf
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
NOTIFYCMD /usr/sbin/upssched
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
MONITOR MILLRACKUPS01 at 192.168.0.3<mailto:MILLRACKUPS01 at 192.168.0.3> 1 xcpnghost ****** master


Cat  /usr/lib/systemd/system-shutdown/nutshutdown
#!/bin/sh
# /usr/sbin/upsmon -K >/dev/null 2>&1 && /usr/sbin/upsdrvctl shutdown
if (test -f /etc/killpower)
then
echo "Killing the power, bye!"
/usr/sbin/upsdrvctl shutdown
# /usr/local/ups/bin/upsdrvctl shutdown
sleep 120
# uh oh... the UPS power-off failed
# you probably want to reboot here so you don't get stuck!
# *** see also the section on power races in the FAQ! ***
Fi

upsdrvctl -h
Network UPS Tools - UPS driver controller 2.7.4

cat /etc/ups/ups.conf
[MILLRACKUPS01]
        driver = "snmp-ups"
        port = "192.168.0.32"
        desc = "Smart-UPS X 2000"
        mibs = "apcc"
        community = "public"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20211207/f7a27263/attachment.htm>


More information about the Nut-upsuser mailing list