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 <stokito@gmail.com>
This commit is contained in:
Sergey Ponomarev 2023-08-04 17:19:30 +03:00 committed by Josef Schlehofer
parent 1f591bcc1c
commit eee8f9e1e7
1 changed files with 3 additions and 1 deletions

View File

@ -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"