forked from EvergreenCrypto/docker-finance
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
|
||||
|
||||
# Test for Tor plugin
|
||||
if ! "${_exec[@]}" curl -s "https://check.torproject.org" &>/dev/null; then
|
||||
lib_utils::die_fatal "Tor plugin not started (or needs restart)"
|
||||
if [ ! -z "${_exec[*]}" ]; then
|
||||
if ! "${_exec[@]}" curl -s "https://check.torproject.org" &>/dev/null; then
|
||||
lib_utils::die_fatal "Tor plugin not started (or needs restart)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# TODO: remove no-limit after internal fetching writes per-paginated instead of per-fetch
|
||||
|
||||
Reference in New Issue
Block a user