mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
sysutils/nut: add riello driver (#1389)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= nut
|
||||
PLUGIN_VERSION= 1.4
|
||||
PLUGIN_VERSION= 1.5
|
||||
PLUGIN_COMMENT= Network UPS Tools
|
||||
PLUGIN_DEPENDS= nut
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
||||
@@ -134,6 +134,22 @@
|
||||
<help>Set the password of the remote NUT server.</help>
|
||||
</field>
|
||||
</subtab>
|
||||
<subtab id="nut-ups-riello" description="Riello-Driver">
|
||||
<field>
|
||||
<id>nut.riello.enable</id>
|
||||
<label>Enable</label>
|
||||
<type>checkbox</type>
|
||||
<help>Enable the Riello driver.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>nut.riello.args</id>
|
||||
<label>Extra Arguments</label>
|
||||
<style>tokenize</style>
|
||||
<type>select_multiple</type>
|
||||
<allownew>true</allownew>
|
||||
<help>Set extra arguments for this UPS, e.g. "port=auto".</help>
|
||||
</field>
|
||||
</subtab>
|
||||
</tab>
|
||||
|
||||
<activetab>nut-general-settings</activetab>
|
||||
|
||||
@@ -93,5 +93,15 @@
|
||||
<Required>N</Required>
|
||||
</password>
|
||||
</netclient>
|
||||
<riello>
|
||||
<enable type="BooleanField">
|
||||
<Required>Y</Required>
|
||||
<default>0</default>
|
||||
</enable>
|
||||
<args type="CSVListField">
|
||||
<default>port=auto</default>
|
||||
<Required>N</Required>
|
||||
</args>
|
||||
</riello>
|
||||
</items>
|
||||
</model>
|
||||
|
||||
@@ -38,4 +38,13 @@ driver=blazer_ser
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.Nut.riello.enable') and OPNsense.Nut.riello.enable == '1' %}
|
||||
[{{ OPNsense.Nut.general.name }}]
|
||||
driver=riello_usb
|
||||
{% if helpers.exists('OPNsense.Nut.riello.args') and OPNsense.Nut.riello.args != '' %}
|
||||
{% for args in OPNsense.Nut.riello.args.split(',') %}
|
||||
{{ args }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -26,3 +26,8 @@ MONITOR {{ OPNsense.Nut.general.name }} 1 monuser {{ OPNsense.Nut.account.mon_pa
|
||||
SHUTDOWNCMD "/usr/local/etc/rc.halt"
|
||||
POWERDOWNFLAG /etc/killpower
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.Nut.riello.enable') and OPNsense.Nut.riello.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 %}
|
||||
|
||||
Reference in New Issue
Block a user