tor-hs: Use config_get_bool for enable_hs
authorSergey Ponomarev <[email protected]>
Sun, 4 Feb 2024 20:58:32 +0000 (22:58 +0200)
committerJosef Schlehofer <[email protected]>
Tue, 20 May 2025 11:20:46 +0000 (13:20 +0200)
Signed-off-by: Sergey Ponomarev <[email protected]>
net/tor-hs/files/tor-hs.init

index 0e01fc06638c1f9b805072931ad30a09d88bbf6e..2c4bb5e57953a9930957193e78fc0d69709cf3ed 100755 (executable)
@@ -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"