Add full banner headers to all scripts across the codebase

Every script now has the established header format: PURPOSE with ─────── separator,
OPERATIONAL MODEL, DESIGN PRINCIPLES, OPERATIONAL SAFEGUARDS, CONFIGURATION, and
RUNTIME MODES — structured with full ====== banner sections throughout.

Orchestrators converted from compact ── inline format to full banners. Stale
emby-fallback and dirty sync references removed from Plugin/user_script_plug-in.sh.
This commit is contained in:
Gmer4Lfe
2026-06-26 18:50:05 -04:00
parent 1003bee72a
commit f92ee4064b
51 changed files with 1822 additions and 563 deletions
+61 -14
View File
@@ -2,24 +2,71 @@
# ==============================================================================================
# ============================= Sunday Morning Coffee Report ===================================
# ==============================================================================================
#
# PURPOSE
# ─────────────────────────────────────────────────────────────────────────────
# Weekly monitoring orchestrator — runs all Sunday monitor scripts in sequence.
# Designed to be read over coffee Sunday morning while the system is fully caught up
# from the 2:30am maintenance window.
# Schedule: 0 7 * * 0 (7am Sunday — after weekly_sync_maintenance.sh finishes at ~3am)
# Designed to be read over coffee while the system is fully caught up from the
# 2:30am maintenance window.
# Schedule: 0 7 * * 0 (7am Sunday — after weekly_sync_maintenance.sh finishes)
#
# ── SCRIPTS (master.conf COFFEE_REPORT_SCRIPTS) ───────────────────────────────────────────────
# Each script runs independently, logs to its own output, and notifies on findings.
# All scripts receive --dry-run and --log flags from this orchestrator when set.
# ==============================================================================================
# OPERATIONAL MODEL
# ==============================================================================================
#
# ── HOST AWARENESS ────────────────────────────────────────────────────────────────────────────
# detect_hosts() sets MY_ID — used in banner and summary.
# HOST1 primary: runs all scripts. HOST2: limited to host-aware scripts only.
# Runs COFFEE_REPORT_SCRIPTS from master.conf in order. Each script runs
# independently, produces its own output, and notifies on findings.
# All scripts receive --dry-run and --log flags from this orchestrator when set.
#
# HOST1 primary: runs all scripts.
# HOST2: limited to host-aware scripts only — each script handles its own host logic.
#
# ==============================================================================================
# DESIGN PRINCIPLES
# ==============================================================================================
#
# Independent, Isolated Scripts
# Each monitor script is fully self-contained — a failure in one does not
# prevent the others from running. The orchestrator logs the failure and
# continues to the next script.
#
# Runs After the Full Weekly Window
# Scheduled 4+ hours after weekly_sync_maintenance.sh — the system is fully
# synced and containers are back up before any monitoring reads run. Reports
# reflect the settled post-maintenance state.
#
# ==============================================================================================
# OPERATIONAL SAFEGUARDS
# ==============================================================================================
#
# detect_hosts() — MY_ID in banner and summary
# Non-fatal steps — a failed script is logged; remaining scripts still run
# Flag pass-through — --dry-run and --log forwarded to all child scripts
#
# ==============================================================================================
# CONFIGURATION
# ==============================================================================================
#
# master.conf
#
# COFFEE_REPORT_SCRIPTS — ordered list of monitor scripts to run
#
# ==============================================================================================
# RUNTIME MODES
# ==============================================================================================
#
# sunday_morning_coffee_report.sh
# Normal run.
#
# sunday_morning_coffee_report.sh --dry-run
# Preview without any writes or notifications.
#
# sunday_morning_coffee_report.sh --log
# Verbose per-script output.
#
# sunday_morning_coffee_report.sh --status
# Show configured scripts and exit.
#
# ── USAGE ─────────────────────────────────────────────────────────────────────────────────────
# sunday_morning_coffee_report.sh — normal run
# sunday_morning_coffee_report.sh --dry-run — preview without any writes or notifications
# sunday_morning_coffee_report.sh --log — verbose per-script output
# sunday_morning_coffee_report.sh --status — show configured scripts and exit
# ==============================================================================================
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"