From f521f43159391298b28635e36914e9379faade71 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 14 Nov 2016 08:28:35 +0100 Subject: [PATCH] (tinc) polishing --- net/tinc/Makefile | 3 +-- net/tinc/src/etc/rc.d/opnsense-tincd | 2 ++ .../src/opnsense/service/conf/actions.d/actions_tinc.conf | 6 +++--- .../service/templates/OPNsense/Tinc/tinc_deploy.xml | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/net/tinc/Makefile b/net/tinc/Makefile index 41e14819d..d3eeaf4d1 100644 --- a/net/tinc/Makefile +++ b/net/tinc/Makefile @@ -1,8 +1,7 @@ PLUGIN_NAME= tinc -PLUGIN_VERSION= 0.2 +PLUGIN_VERSION= 1.0 PLUGIN_COMMENT= Tinc VPN PLUGIN_DEPENDS= tinc PLUGIN_MAINTAINER= ad@opnsense.org -PLUGIN_PRIVATE= yes .include "../../Mk/plugins.mk" diff --git a/net/tinc/src/etc/rc.d/opnsense-tincd b/net/tinc/src/etc/rc.d/opnsense-tincd index 5f7b0a439..7da078c14 100755 --- a/net/tinc/src/etc/rc.d/opnsense-tincd +++ b/net/tinc/src/etc/rc.d/opnsense-tincd @@ -15,6 +15,8 @@ stop_cmd=tincd_stop start_cmd=tincd_start rcvar=OPNtincd_enable +load_rc_config $name + [ -z "$OPNtincd_enable" ] && OPNtincd_enable="NO" # stop tincd diff --git a/net/tinc/src/opnsense/service/conf/actions.d/actions_tinc.conf b/net/tinc/src/opnsense/service/conf/actions.d/actions_tinc.conf index 522bdabbd..55c905ddf 100644 --- a/net/tinc/src/opnsense/service/conf/actions.d/actions_tinc.conf +++ b/net/tinc/src/opnsense/service/conf/actions.d/actions_tinc.conf @@ -5,19 +5,19 @@ type:script_output message:generate new keypair [stop] -command:/usr/local/etc/rc.d/opnsense-tincd stop +command:/usr/local/etc/rc.d/opnsense-tincd onestop parameters: type:script message:stop tincd [start] -command:/usr/local/etc/rc.d/opnsense-tincd start +command:/usr/local/etc/rc.d/opnsense-tincd onestart parameters: type:script message:start tincd [restart] -command:/usr/local/etc/rc.d/opnsense-tincd restart +command:/usr/local/etc/rc.d/opnsense-tincd onerestart parameters: type:script message:restart tincd diff --git a/net/tinc/src/opnsense/service/templates/OPNsense/Tinc/tinc_deploy.xml b/net/tinc/src/opnsense/service/templates/OPNsense/Tinc/tinc_deploy.xml index e7e67f3a1..04751a509 100644 --- a/net/tinc/src/opnsense/service/templates/OPNsense/Tinc/tinc_deploy.xml +++ b/net/tinc/src/opnsense/service/templates/OPNsense/Tinc/tinc_deploy.xml @@ -1,6 +1,7 @@ {% if helpers.exists('OPNsense.Tinc.networks.network') %} {% for network in helpers.toList('OPNsense.Tinc.networks.network', 'id') %} +{% if network.enabled|default('0') == '1' %} {{network.id}} {{network.hostname}} @@ -31,6 +32,7 @@ {% endfor %} +{% endif %} {% endfor %} {% endif %} \ No newline at end of file