output: watchdog visibility — parity/grace/disabled exits now echo, docker_watchdog container count, api_key_renew status always visible

This commit is contained in:
Gmer4Lfe
2026-06-01 20:22:52 -04:00
parent f8325a7067
commit 5e89f334bb
4 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ acquire_lock
detect_hosts
[[ "${NETWORK_WATCHDOG_ENABLED:-true}" != "true" ]] && log "Network watchdog disabled" && exit 0
[[ "${NETWORK_WATCHDOG_ENABLED:-true}" != "true" ]] && echo "Network watchdog disabled" && exit 0
[[ "$DRY_RUN" == true ]] && warn "DRY RUN — no containers will be restarted"
touch "${NETWORK_WATCHDOG_NPM_STATE_FILE}" 2>/dev/null
+6 -6
View File
@@ -235,7 +235,7 @@ acquire_lock
detect_hosts
if ! is_docker_enabled; then
log "Docker not enabled in Unraid settings — skipping cycle"
echo "Docker not enabled in Unraid settings — skipping cycle"
exit 0
fi
@@ -631,7 +631,7 @@ CYCLE_START=$(date +%s)
# ── Parity check — skip restarts during parity ───────────────────────────────────────────
if is_parity_running; then
log "Parity check in progress — skipping restart actions this run"
echo "Parity in progress — restart actions skipped ($(date '+%H:%M:%S'))"
exit 0
fi
@@ -944,11 +944,11 @@ CYCLE_START=$(date +%s)
TOTAL_WARNINGS=$(( T1_WARNINGS + T2_WARNINGS ))
CYCLE_END=$(date +%s)
CONTAINER_COUNT=$(docker ps -q 2>/dev/null | wc -l | tr -d ' ')
if [[ "$TOTAL_RESTARTS" -gt 0 || "$TOTAL_WARNINGS" -gt 0 ]]; then
echo "$ICON_WATCHDOG T1: $T1_RESTARTS restarts / $T1_WARNINGS warnings"
echo "$ICON_WATCHDOG T2: $T2_RESTARTS restarts / $T2_WARNINGS warnings"
echo "$ICON_TIME Duration: $(format_duration $(( CYCLE_END - CYCLE_START )))"
echo "$ICON_WATCHDOG T1: $T1_RESTARTS restarts / $T1_WARNINGS warnings T2: $T2_RESTARTS restarts / $T2_WARNINGS warnings"
echo "$ICON_TIME Duration: $(format_duration $(( CYCLE_END - CYCLE_START ))) Containers: $CONTAINER_COUNT"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
else
echo "All healthy ✅ ($(date '+%H:%M:%S'))"
echo "All healthy ✅${CONTAINER_COUNT} containers ($(date '+%H:%M:%S'))"
fi