Compare commits

..

2 commits

View file

@ -361,15 +361,14 @@ function exec_in_container() {
# Implement check inside a function to allow running it in parallel
# Parameters : [container] [output file]
function check_container() {
local container="$1" output_file="$2" status="" check_plugin check_plugin_cmd=() status ex
local container="$1" output_file="$2" status="" check_plugin status ex
for check_plugin in "${!CHECK_PLUGINS[@]}"; do
if ! exec_in_container "$container" test -e "$check_plugin" > /dev/null 2>&1; then
debug "$container - Plugin $check_plugin not found"
continue
fi
debug "$container - Plugin $check_plugin found, use it"
read -ra check_plugin_cmd <<< "${CHECK_PLUGINS[${check_plugin}]}"
status="$( exec_in_container "$container" "${check_plugin_cmd[@]}" 2>&1 )"
status="$( exec_in_container "$container" "${CHECK_PLUGINS[${check_plugin}]}" 2>&1 )"
ex=$?
debug "$container - Plugin output: $status"
debug "$container - Plugin exit code: $ex"