Skip to content

Commit

Permalink
Keep error code with timeout (--preserve-status)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian L. committed May 14, 2024
1 parent 41ca295 commit 9e595f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ while IFS=';' read -r MY_COMMAND MY_HOSTNAME_STRING MY_PORT || [[ -n "$MY_COMMAN
else
cmd="$MY_HOSTNAME"
fi
(timeout "$MY_SCRIPT_TIMEOUT" "$cmd" &> /dev/null)
(timeout "$MY_SCRIPT_TIMEOUT" --preserve-status "$cmd" &> /dev/null)
case "$?" in
"0")
check_downtime "$MY_COMMAND" "$MY_HOSTNAME_STRING" "$MY_PORT"
Expand Down

0 comments on commit 9e595f3

Please sign in to comment.