Skip to content

Commit

Permalink
fix: tor-hs.init hs hook processing
Browse files Browse the repository at this point in the history
Signed-off-by: Cory Latschkowski <[email protected]>
  • Loading branch information
codekow authored Dec 29, 2024
1 parent 86d774e commit 2180fdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/tor-hs/files/tor-hs.init
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ parse_hs_conf_hooks() {
local name hook_script enable_hs hostname_file
local config="$1"

config_get enable_hs "$config" Enabled 0
config_get_bool enable_hs "$config" Enabled 0
config_get hook_script "$config" HookScript
config_get name "$config" Name

hostname="$HS_DIR_PATH/$name/hostname"

# check if we should run hook_script
if [ "$enable_hs" = "true" ] && [ -x "$hook_script" ] && [ -f "$hostname" ] ; then
if [ "$enable_hs" = "1" ] && [ -x "$hook_script" ] && [ -f "$hostname" ] ; then
hostname_uri=$(cat "$hostname")
# call hook script
$hook_script "--update-onion" "$hostname_uri"
Expand Down

0 comments on commit 2180fdb

Please sign in to comment.