From 1c140865f8a590fc8e294b2998f528142eacf825 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 31 Oct 2023 22:06:48 +0100 Subject: [PATCH] v0.2.0 of watch-containers.sh --- watch-containers.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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