diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile index d58c2f974..fcececcc4 100644 --- a/sysutils/nut/Makefile +++ b/sysutils/nut/Makefile @@ -1,6 +1,6 @@ PLUGIN_NAME= nut PLUGIN_VERSION= 1.3 -PLUGIN_REVISION= 1 +PLUGIN_REVISION= 2 PLUGIN_COMMENT= Network UPS Tools PLUGIN_DEPENDS= nut PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/sysutils/nut/src/opnsense/mvc/app/models/OPNsense/Nut/Nut.xml b/sysutils/nut/src/opnsense/mvc/app/models/OPNsense/Nut/Nut.xml index 3419274d3..1a1a91891 100644 --- a/sysutils/nut/src/opnsense/mvc/app/models/OPNsense/Nut/Nut.xml +++ b/sysutils/nut/src/opnsense/mvc/app/models/OPNsense/Nut/Nut.xml @@ -16,7 +16,7 @@ netclient - + UPSName Y diff --git a/sysutils/nut/src/opnsense/service/templates/OPNsense/Nut/upsmon.conf b/sysutils/nut/src/opnsense/service/templates/OPNsense/Nut/upsmon.conf index 4b6ce6fb5..f33968a9f 100644 --- a/sysutils/nut/src/opnsense/service/templates/OPNsense/Nut/upsmon.conf +++ b/sysutils/nut/src/opnsense/service/templates/OPNsense/Nut/upsmon.conf @@ -11,3 +11,18 @@ MONITOR {{ OPNsense.Nut.general.name }}@{{ OPNsense.Nut.netclient.address }} 1 { SHUTDOWNCMD "/usr/local/etc/rc.halt" POWERDOWNFLAG /etc/killpower {% endif %} +{% if helpers.exists('OPNsense.Nut.apcsmart.enable') and OPNsense.Nut.apcsmart.enable == '1' %} +MONITOR {{ OPNsense.Nut.general.name }} 1 monuser {{ OPNsense.Nut.account.mon_password }} master +SHUTDOWNCMD "/usr/local/etc/rc.halt" +POWERDOWNFLAG /etc/killpower +{% endif %} +{% if helpers.exists('OPNsense.Nut.blazerusb.enable') and OPNsense.Nut.blazerusb.enable == '1' %} +MONITOR {{ OPNsense.Nut.general.name }} 1 monuser {{ OPNsense.Nut.account.mon_password }} master +SHUTDOWNCMD "/usr/local/etc/rc.halt" +POWERDOWNFLAG /etc/killpower +{% endif %} +{% if helpers.exists('OPNsense.Nut.blazerser.enable') and OPNsense.Nut.blazerser.enable == '1' %} +MONITOR {{ OPNsense.Nut.general.name }} 1 monuser {{ OPNsense.Nut.account.mon_password }} master +SHUTDOWNCMD "/usr/local/etc/rc.halt" +POWERDOWNFLAG /etc/killpower +{% endif %}