mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-04 22:33:07 -04:00
net-mgmt/net-snmp: update to 0.2
This commit is contained in:
parent
9488e44c3e
commit
3cc1b903ab
4 changed files with 24 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= net-snmp
|
||||
PLUGIN_VERSION= 0.1
|
||||
PLUGIN_VERSION= 0.2
|
||||
PLUGIN_COMMENT= Net-SNMP is a daemon for the SNMP protocol
|
||||
PLUGIN_DEPENDS= net-snmp
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
|
|
|||
|
|
@ -23,4 +23,12 @@
|
|||
<type>text</type>
|
||||
<help>Set the contact address to use.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.listen</id>
|
||||
<label>Listen IPs</label>
|
||||
<style>tokenize</style>
|
||||
<type>select_multiple</type>
|
||||
<allownew>true</allownew>
|
||||
<help>Set the IP addresses the service should listen to.</help>
|
||||
</field>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -19,5 +19,9 @@
|
|||
<default></default>
|
||||
<Required>N</Required>
|
||||
</syscontact>
|
||||
<listen type="NetworkField">
|
||||
<FieldSeparator>,</FieldSeparator>
|
||||
<Required>N</Required>
|
||||
</listen>
|
||||
</items>
|
||||
</model>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,17 @@
|
|||
{% if helpers.exists('OPNsense.netsnmp.general.enabled') and OPNsense.netsnmp.general.enabled == '1' %}
|
||||
|
||||
{% from 'OPNsense/Macros/interface.macro' import physical_interface %}
|
||||
|
||||
{% if helpers.exists('OPNsense.netsnmp.general.listen') and OPNsense.netsnmp.general.listen != '' %}
|
||||
{% for network in OPNsense.netsnmp.general.listen.split(',') %}
|
||||
{% if ':' not in network %}
|
||||
agentAddress udp:{{ network }}:161
|
||||
{% else %}
|
||||
agentAddress udp6:[{{ network }}]:161
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
agentAddress udp:161,udp6:[::1]:161
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if helpers.exists('OPNsense.netsnmp.general.community') and OPNsense.netsnmp.general.community != '' %}
|
||||
rocommunity {{ OPNsense.netsnmp.general.community }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue