safeguard: skip watchdog cycle if array not started

Exits cleanly before startup grace check if /mnt/user is not mounted
as shfs. Prevents watchdogs running against Docker/storage that isn't
available, and blocks false-positive reboots when array is stopped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gmer4Lfe
2026-05-31 14:14:00 -04:00
co-authored by Claude Sonnet 4.6
parent cbf8593225
commit b9b1d20499
+13
View File
@@ -16,6 +16,11 @@
# System Watchdog last — only triggers if prior layers could not resolve the issue.
# Rebooting without first reducing pressure may reboot into the same state.
#
# ── ARRAY CHECK ───────────────────────────────────────────────────────────────────────────────
# Exits immediately if /mnt/user is not mounted as shfs (array not started).
# Watchdogs check Docker containers and storage — meaningless without the array.
# Prevents false positives and unnecessary reboots when array is stopped or stopping.
#
# ── STARTUP GRACE ─────────────────────────────────────────────────────────────────────────────
# No action until system uptime >= WATCHDOG_STARTUP_GRACE seconds.
# Prevents false positives from containers still starting at array launch.
@@ -110,6 +115,14 @@ if [[ "$SHOW_STATUS" == true ]]; then
exit 0
fi
# ==============================================================================================
# ━━━ Array Check ━━━
# ==============================================================================================
if ! df --output=fstype /mnt/user 2>/dev/null | grep -q shfs; then
log "Array not started — skipping watchdog cycle"
exit 0
fi
# ==============================================================================================
# ━━━ Startup Grace ━━━
# ==============================================================================================