mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
more detailed logging for the retry command
This commit is contained in:
@@ -311,12 +311,19 @@ retry() {
|
|||||||
if [[ "$output" =~ "$expectedOutput" ]]; then
|
if [[ "$output" =~ "$expectedOutput" ]]; then
|
||||||
return $exitcode
|
return $exitcode
|
||||||
else
|
else
|
||||||
echo "Expected '$expectedOutput' but got '$output'"
|
echo "Did not find expectedOutput: '$expectedOutput' in the output below from running the command: '$cmd'"
|
||||||
|
echo "<Start of output>"
|
||||||
|
echo "$output"
|
||||||
|
echo "<End of output>"
|
||||||
fi
|
fi
|
||||||
elif [ -n "$failedOutput" ]; then
|
elif [ -n "$failedOutput" ]; then
|
||||||
if [[ "$output" =~ "$failedOutput" ]]; then
|
if [[ "$output" =~ "$failedOutput" ]]; then
|
||||||
echo "Found failed output '$failedOutput' in '$output'. Setting exitcode to 1."
|
echo "Found failedOutput: '$failedOutput' in the output below from running the command: '$cmd'"
|
||||||
|
echo "<Start of output>"
|
||||||
|
echo "$output"
|
||||||
|
echo "<End of output>"
|
||||||
if [[ $exitcode -eq 0 ]]; then
|
if [[ $exitcode -eq 0 ]]; then
|
||||||
|
echo "The exitcode was 0, but we are setting to 1 since we found $failedOutput in the output."
|
||||||
exitcode=1
|
exitcode=1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user