net/zerotier: allow for local.conf settings

According to the Zerotier documentation:

https://www.zerotier.com/manual.shtml#4_2 - Local Configuration Options

Zerotier will honour specific settings contained within a local.conf file in
the Zerotier home directory. Having the ability to write out this file will
allow for flexibility for users to fine-tune their Zerotier installation
according to their specific needs.

Fixes #284

-=david=-
This commit is contained in:
David Harrigan
2017-09-25 14:31:52 +01:00
committed by Franco Fichtner
parent 4581f23860
commit 32e478ff45
6 changed files with 20 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= zerotier
PLUGIN_VERSION= 1.1.0
PLUGIN_VERSION= 1.2.0
PLUGIN_COMMENT= Virtual Networks That Just Work
PLUGIN_DEPENDS= zerotier
PLUGIN_MAINTAINER= dharrigan@gmail.com
@@ -5,4 +5,12 @@
<type>checkbox</type>
<help>This will activate the Zerotier service</help>
</field>
<field>
<id>zerotier.localconf</id>
<label>local.conf settings</label>
<type>textbox</type>
<height>10</height>
<help>Contains configuration options that apply to the local node</help>
</field>
</form>
@@ -3,12 +3,15 @@
<description>
Zerotier - Virtual Networks That Just Work.
</description>
<version>1.1.0</version>
<version>1.2.0</version>
<items>
<enabled type="BooleanField">
<default>0</default>
<Required>Y</Required>
</enabled>
<localconf type="TextField">
<Required>N</Required>
</localconf>
<networks>
<network type="ArrayField">
<enabled type="BooleanField">
@@ -1 +1,2 @@
zerotier:/etc/rc.conf.d/zerotier
local.conf:/var/db/zerotier-one/local.conf
@@ -0,0 +1,3 @@
{% if helpers.exists('OPNsense.zerotier.localconf') and OPNsense.zerotier.localconf|default("") != "" %}
{{ OPNsense.zerotier.localconf }}
{% endif %}
@@ -1,3 +1,6 @@
#
# This file is automatically generated. Do not manually edit this file - changes *will* be lost!
#
{% if helpers.exists('OPNsense.zerotier.enabled') and OPNsense.zerotier.enabled == '1' %}
zerotier_enable="YES"
{% else %}