Skip to content

Commit

Permalink
Merge pull request #80 from brknkfr/fix_script_timeout_errorcode
Browse files Browse the repository at this point in the history
Keep error code with timeout (--preserve-status)
  • Loading branch information
Cyclenerd authored May 14, 2024
2 parents b06b249 + 9e595f3 commit bf485c5
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 bf485c5

Please sign in to comment.