Compare commits
2 commits
12ee40593c
...
345316947b
Author | SHA1 | Date | |
---|---|---|---|
345316947b | |||
2b84e80148 |
1 changed files with 3 additions and 2 deletions
|
@ -361,14 +361,15 @@ 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 status ex
|
||||
local container="$1" output_file="$2" status="" check_plugin check_plugin_cmd=() 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"
|
||||
status="$( exec_in_container "$container" "${CHECK_PLUGINS[${check_plugin}]}" 2>&1 )"
|
||||
read -ra check_plugin_cmd <<< "${CHECK_PLUGINS[${check_plugin}]}"
|
||||
status="$( exec_in_container "$container" "${check_plugin_cmd[@]}" 2>&1 )"
|
||||
ex=$?
|
||||
debug "$container - Plugin output: $status"
|
||||
debug "$container - Plugin exit code: $ex"
|
||||
|
|
Loading…
Reference in a new issue