sysutils/nut - Add port field to netclient (#2052)

This commit is contained in:
ruworuro
2021-10-21 15:29:33 +02:00
committed by GitHub
parent 161ff20d69
commit 293d1708fc
4 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= nut
PLUGIN_VERSION= 1.8
PLUGIN_VERSION= 1.8.1
PLUGIN_COMMENT= Network UPS Tools
PLUGIN_DEPENDS= nut
PLUGIN_MAINTAINER= m.muenz@gmail.com
@@ -157,6 +157,12 @@
<type>text</type>
<help>Set the IP address of the remote NUT server.</help>
</field>
<field>
<id>nut.netclient.port</id>
<label>Port</label>
<type>text</type>
<help>Set the TCP port of the remote NUT server.</help>
</field>
<field>
<id>nut.netclient.user</id>
<label>Username</label>
@@ -111,6 +111,10 @@
<default></default>
<Required>N</Required>
</address>
<port type="PortField">
<default>3493</default>
<Required>N</Required>
</port>
<user type="TextField">
<Required>N</Required>
</user>
@@ -7,7 +7,7 @@ SHUTDOWNCMD "/usr/local/etc/rc.halt"
POWERDOWNFLAG /etc/killpower
{% endif %}
{% if helpers.exists('OPNsense.Nut.netclient.enable') and OPNsense.Nut.netclient.enable == '1' %}
MONITOR {{ OPNsense.Nut.general.name }}@{{ OPNsense.Nut.netclient.address }} 1 {{ OPNsense.Nut.netclient.user }} {{ OPNsense.Nut.netclient.password }} slave
MONITOR {{ OPNsense.Nut.general.name }}@{{ OPNsense.Nut.netclient.address }}{% if helpers.exists('OPNsense.Nut.netclient.port') %}:{{ OPNsense.Nut.netclient.port }}{% endif %} 1 {{ OPNsense.Nut.netclient.user }} {{ OPNsense.Nut.netclient.password }} slave
SHUTDOWNCMD "/usr/local/etc/rc.halt"
POWERDOWNFLAG /etc/killpower
{% endif %}