container: finance: lib_fetch: fix Tor plugin (proxychains) check
This ensures that curl will only be executed if the Tor plugin (proxychains) argument is enabled.
This commit is contained in:
@@ -834,8 +834,10 @@ function lib_fetch::__fetch_exec()
|
|||||||
[[ "$global_arg_tor" =~ ^on$|^true$ ]] && _exec+=("proxychains") # Wrap with proxychains
|
[[ "$global_arg_tor" =~ ^on$|^true$ ]] && _exec+=("proxychains") # Wrap with proxychains
|
||||||
|
|
||||||
# Test for Tor plugin
|
# Test for Tor plugin
|
||||||
if ! "${_exec[@]}" curl -s "https://check.torproject.org" &>/dev/null; then
|
if [ ! -z "${_exec[*]}" ]; then
|
||||||
lib_utils::die_fatal "Tor plugin not started (or needs restart)"
|
if ! "${_exec[@]}" curl -s "https://check.torproject.org" &>/dev/null; then
|
||||||
|
lib_utils::die_fatal "Tor plugin not started (or needs restart)"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: remove no-limit after internal fetching writes per-paginated instead of per-fetch
|
# TODO: remove no-limit after internal fetching writes per-paginated instead of per-fetch
|
||||||
|
|||||||
Reference in New Issue
Block a user