net/stunnel: add enabled config option 5264/head
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 30 Nov 2017 09:01:21 +0000 (10:01 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Fri, 15 Dec 2017 07:03:41 +0000 (08:03 +0100)
Add an enabled option for the service section, so you could keep your
configuration in place without apply this section on startup or service reload.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/stunnel/Makefile
net/stunnel/files/stunnel.init

index 8bac6fc9f31f0b7a47d4d277cbe074e6303ad457..5fcad35097ccc816834e39122f498d20f8c7c13b 100644 (file)
@@ -9,10 +9,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stunnel
 PKG_VERSION:=5.44
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_LICENSE:=GPL-2.0+
-PKG_MAINTAINER:=Daniel Engberg <daniel.engberg.lists@pyret.net>
+PKG_MAINTAINER:=Daniel Engberg <daniel.engberg.lists@pyret.net> \
+               Florian Eckert <fe@dev.tdt.de>
 PKG_LICENSE_FILES:=COPYING COPYRIGHT.GPL
 
 PKG_SOURCE_URL:= \
index d0b147e984ff094dc96529acfbeadac93e755909..2c7d0effd16e54ec700ec2eed3d736cdd8bbe767 100644 (file)
@@ -81,7 +81,10 @@ print_list_colon() {
 
 service_section() {
        local cfg="$1"
-       local accept_host accept_port
+       local accept_host accept_port enabled
+
+       config_get_bool enabled "$cfg" 'enabled' '1'
+       [ ${enabled} -gt 0 ] || return 0
 
        printf "\n" >> "$CONF_FILE"
        printf "[%s]\n" "$cfg" >> "$CONF_FILE"