From 3fc880c2e9d507abfc17eb6739120ea3242e7932 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 30 Nov 2017 10:01:21 +0100 Subject: [PATCH] net/stunnel: add enabled config option 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 --- net/stunnel/Makefile | 5 +++-- net/stunnel/files/stunnel.init | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/net/stunnel/Makefile b/net/stunnel/Makefile index 8bac6fc9f..5fcad3509 100644 --- a/net/stunnel/Makefile +++ b/net/stunnel/Makefile @@ -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 +PKG_MAINTAINER:=Daniel Engberg \ + Florian Eckert PKG_LICENSE_FILES:=COPYING COPYRIGHT.GPL PKG_SOURCE_URL:= \ diff --git a/net/stunnel/files/stunnel.init b/net/stunnel/files/stunnel.init index d0b147e98..2c7d0effd 100644 --- a/net/stunnel/files/stunnel.init +++ b/net/stunnel/files/stunnel.init @@ -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"