Ken Brubacher
2021-Dec-07 20:30 UTC
[Nut-upsuser] upsdrvctl shutdown isn't powering down UPS
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>
Roger Price
2021-Dec-08 13:17 UTC
[Nut-upsuser] upsdrvctl shutdown isn't powering down UPS
On Tue, 7 Dec 2021, Ken Brubacher wrote:> 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.Do you use a systemd service unit to command the shutdown? Something like: # nut-delayed-ups-shutdown.service [Unit] Description=Initiate delayed UPS shutdown Before=umount.target DefaultDependencies=no [Service] Type=oneshot ExecStart=/usr/bin/logger -t nut-delayed-ups-shutdown\ "upsdrvctl shutting down UPS" ExecStart=/sbin/upsdrvctl shutdown # Debian [Install] WantedBy=final.target Has it been enabled? Roger