Add check-updates command to detect and update outdated agents and services
This commit is contained in:
@@ -95,6 +95,12 @@ if [[ -d "${SERVICES_DIR}" ]]; then
|
||||
ports="$ports_output"
|
||||
fi
|
||||
|
||||
# -- Get template hash --
|
||||
template_hash=""
|
||||
if [[ -f "${service_dir}template.hash" ]]; then
|
||||
template_hash=$(cat "${service_dir}template.hash" | tr -d '[:space:]')
|
||||
fi
|
||||
|
||||
# -- Output JSON for this service --
|
||||
if [[ "$first" == "true" ]]; then
|
||||
first=false
|
||||
@@ -108,6 +114,8 @@ if [[ -d "${SERVICES_DIR}" ]]; then
|
||||
json_escape "$status"
|
||||
echo -n '","ports":"'
|
||||
json_escape "$ports"
|
||||
echo -n '","template_hash":"'
|
||||
json_escape "$template_hash"
|
||||
echo -n '"}'
|
||||
done
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user