-
Hello
I have a NUT server on pfsense (on a VM) with an UPS configured.
Another Ubuntu VM with NUT client.
I would like to poweroff the Ubuntu when NUT is ONBATT.On client side I get the information that UPS is ON BAT, but my client conf does not switch off the VM
my "upsmon.conf"
MONITOR BX500MI@VMserverNUT 1 user-monitor password slave MINSUPPLIES 1 SHUTDOWNCMD "/sbin/shutdown -h +0" POLLFREQ 30 POLLFREQALERT 15 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG /etc/killpower RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 5 NOTIFYFLAG ONLINE SYSLOG+WALL NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC NOTIFYFLAG LOWBATT SYSLOG+WALL NOTIFYFLAG FSD SYSLOG+WALL NOTIFYCMD /usr/sbin/upssched
my "upssched.conf"
CMDSCRIPT /usr/sbin/upsmon -c fsd
my understanding of NUT :
The file "upsmon.conf"" define that on "ONBATT" state- he send to syslog a print => Ok check in syslog
- he display mlessage on the console => Ok
- he execute the command specify in "NOTIFYCMD" => I guess "/usr/sbin/upssched" execute the command in the "upssched.conf" => So "/usr/sbin/upsmon -c fsd" => but it is not the case ...
Where am I wrong?
I know is it not a pfsense issue :-) but did not find a NUT forum...thanks
-
One solution (a litle more complex... but that works)
change "upssched.conf"
CMDSCRIPT /usr/bin/upssched-cmd PIPEFN /etc/nut/upssched.pipe LOCKFN /etc/nut/upssched.lock AT ONBATT * EXECUTE powerdown
modify "/usr/bin/upssched-cmd"
case $1 in powerdown) logger -t upssched-cmd "The UPS has been on battery - shutdown required" /usr/sbin/upsmon -c fsd ;; *) logger -t upssched-cmd "Unrecognized command: $1" ;; esac
-
@ewok2 said in NUT server on Pfsense:
I know is it not a pfsense issue :-) but did not find a NUT forum...
https://networkupstools.org/support.html
-
@dennypage said in NUT server on Pfsense:
I know this page but it is not a forum?
You have FAQ where I have search
And mailing list but I thinks it more for developper? -
-