container: finance: add dependency checks for modules
Since modules are included upon build type, if a build doesn't support a feature then that feature's dependencies will not be available. This commit will give notice of those missing dependencies.
This commit is contained in:
@@ -831,17 +831,22 @@ function lib_fetch::__fetch_exec()
|
||||
#
|
||||
|
||||
local _exec=()
|
||||
[[ "$global_arg_tor" =~ ^on$|^true$ ]] && _exec+=("proxychains") # Wrap with proxychains
|
||||
if [[ "$global_arg_tor" =~ ^on$|^true$ ]]; then
|
||||
lib_utils::deps_check "proxychains"
|
||||
_exec+=("proxychains") # Wrap with proxychains
|
||||
fi
|
||||
|
||||
# Test for Tor plugin
|
||||
if [ ! -z "${_exec[*]}" ]; then
|
||||
lib_utils::deps_check "curl"
|
||||
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
|
||||
_exec+=("/usr/bin/php" "-d" "memory_limit=\"-1\"" "-d" "include_path=\"/usr/local/lib:${_dir}\"")
|
||||
lib_utils::deps_check "php"
|
||||
_exec+=("php" "-d" "memory_limit=\"-1\"" "-d" "include_path=\"/usr/local/lib:${_dir}\"")
|
||||
lib_utils::print_debug "${_exec[@]}"
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user