From: Sergey Ponomarev Date: Fri, 4 Aug 2023 14:19:30 +0000 (+0300) Subject: tor-hs: tor-hs.init skip onion service when Name empty X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=eee8f9e1e757875846a079a02aa0a9cea623bd14;p=openwrt-packages.git 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 --- diff --git a/net/tor-hs/files/tor-hs.init b/net/tor-hs/files/tor-hs.init index e4bbfdea7..512e3969b 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"