v0.2.0 of watch-containers.sh should be working
This commit is contained in:
parent
8b79cd6fbc
commit
03cd15584c
|
@ -32,13 +32,11 @@ CHANGELOG=("[2023-10-30][v0.2.0] Complete rewrite based on the new template.sh"
|
|||
|
||||
EXECUTABLE="$(basename $0)"
|
||||
LIBRARIES="lib.sh"
|
||||
DEPENDENCIES="basename dirname readlink jq docker"
|
||||
DEPENDENCIES="basename dirname readlink cat jq docker"
|
||||
REQUIRE_ROOT=0
|
||||
#TODO: make the cache file configurable with an option flag
|
||||
CACHE_FILE="/var/cache/watch-containers.json"
|
||||
|
||||
ONLY_IN_CACHE=()
|
||||
ONLY_IN_CURRENT=()
|
||||
|
||||
##
|
||||
## Functions
|
||||
|
@ -167,6 +165,8 @@ elif [[ -n "${ONLY_IN_CACHE[@]}" ]]; then
|
|||
RESULT=$(printf "Missing containers: %s\n" "${ONLY_IN_CACHE[@]}")
|
||||
elif [[ -n "${ONLY_IN_CURRENT[@]}" ]]; then
|
||||
RESULT=$(printf "New containers: %s\n" "${ONLY_IN_CURRENT[@]}")
|
||||
else
|
||||
RESULT=$(printf "No changes detected")
|
||||
fi
|
||||
|
||||
# Post result to Healthchecks
|
||||
|
|
Loading…
Reference in New Issue