From: Sergey Ponomarev Date: Sun, 4 Feb 2024 20:58:32 +0000 (+0200) Subject: tor-hs: Use config_get_bool for enable_hs X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=4f3c7711af43d9635761002c78714bfd34e5049b;p=openwrt-packages.git tor-hs: Use config_get_bool for enable_hs Signed-off-by: Sergey Ponomarev --- diff --git a/net/tor-hs/files/tor-hs.init b/net/tor-hs/files/tor-hs.init index 0e01fc066..2c4bb5e57 100755 --- a/net/tor-hs/files/tor-hs.init +++ b/net/tor-hs/files/tor-hs.init @@ -69,13 +69,13 @@ parse_hs_conf_hooks() { config_get name "$config" Name [ -z "$name" ] && return 0 - config_get enable_hs "$config" Enabled 0 + config_get_bool enable_hs "$config" Enabled 0 config_get hook_script "$config" HookScript hostname_file="$HS_DIR_PATH/$name/hostname" # check if we should run hook_script - if [ "$enable_hs" = "true" ] && [ -x "$hook_script" ] && [ -f "$hostname_file" ]; then + if [ "$enable_hs" = "1" ] && [ -x "$hook_script" ] && [ -f "$hostname_file" ]; then hostname_uri=$(cat "$hostname_file") # call hook script $hook_script "--update-onion" "$hostname_uri"