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 <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert
2017-11-30 10:01:21 +01:00
parent 205cff1987
commit 3fc880c2e9
2 changed files with 7 additions and 3 deletions
+4 -1
View 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"