diff --git a/watch-containers.sh b/watch-containers.sh index dedc3a3..6191047 100755 --- a/watch-containers.sh +++ b/watch-containers.sh @@ -170,14 +170,16 @@ else fi # Post result to Healthchecks -if [[ -n "$1" ]]; then - if lib_is_url "$1"; then +if [[ -n "$1" ]] && lib_is_url "$1"; then + if [[ "$RESULT" == "No changes detected" ]]; then lib_healthchecks "$1" "$RESULT" + else + lib_healthchecks "${1%/}/fail" "$RESULT" fi fi # Print result to screen -printf "%s\n" "$RESULT" +lib_print "$RESULT" ## ## Here be dragons