From eee8f9e1e757875846a079a02aa0a9cea623bd14 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Fri, 4 Aug 2023 17:19:30 +0300 Subject: [PATCH] tor-hs: tor-hs.init skip onion service when Name empty The Name is used as a HS folder name and can't be empty. Signed-off-by: Sergey Ponomarev --- net/tor-hs/files/tor-hs.init | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/tor-hs/files/tor-hs.init b/net/tor-hs/files/tor-hs.init index e4bbfdea73..512e3969b1 100755 --- a/net/tor-hs/files/tor-hs.init +++ b/net/tor-hs/files/tor-hs.init @@ -49,6 +49,7 @@ parse_hs_conf() { local config="$1" config_get name "$config" Name + [ -z "$name" ] && return 0 config_get description "$config" Description config_get_bool enable_hs "$config" Enabled 0 config_get ipv4 "$config" IPv4 @@ -69,9 +70,10 @@ parse_hs_conf_hooks() { local name hook_script enable_hs hostname_file local config="$1" + config_get name "$config" Name + [ -z "$name" ] && return 0 config_get enable_hs "$config" Enabled 0 config_get hook_script "$config" HookScript - config_get name "$config" Name hostname="$HS_DIR_PATH/$name/hostname" -- 2.30.2