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:
@@ -17,14 +17,39 @@
|
||||
# Profile names are looked up by name from the API at runtime, so profile IDs
|
||||
# do not need to be hardcoded and work across hosts.
|
||||
#
|
||||
# ── USAGE ────────────────────────────────────────────────────────────────────
|
||||
# arr_profile_enforcer.sh [--dry-run] [--sonarr-only] [--radarr-only]
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
# ── CONFIGURATION ────────────────────────────────────────────────────────────
|
||||
# master.conf
|
||||
# ARR_KIDS_PROFILE_NAME — profile name for kids/anime (default: "Kids shows")
|
||||
# ARR_SONARR_DEFAULT_PROFILE — default Sonarr profile name (default: "Any")
|
||||
# ARR_RADARR_DEFAULT_PROFILE — default Radarr profile name (default: "Any (mine)")
|
||||
# Idempotent — only touches items whose current profile is wrong
|
||||
# API-only — no file system changes; profile ID looked up by name at runtime
|
||||
# --dry-run mode — reports what would change without applying any updates
|
||||
#
|
||||
# ==============================================================================================
|
||||
# CONFIGURATION
|
||||
# ==============================================================================================
|
||||
#
|
||||
# master.conf
|
||||
#
|
||||
# ARR_KIDS_PROFILE_NAME — profile name for kids/anime (default: "Kids shows")
|
||||
# ARR_SONARR_DEFAULT_PROFILE — default Sonarr profile name (default: "Any")
|
||||
# ARR_RADARR_DEFAULT_PROFILE — default Radarr profile name (default: "Any (mine)")
|
||||
#
|
||||
# ==============================================================================================
|
||||
# RUNTIME MODES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# arr_profile_enforcer.sh
|
||||
# Enforce profiles in both Sonarr and Radarr.
|
||||
#
|
||||
# arr_profile_enforcer.sh --dry-run
|
||||
# Show which items would be updated without making changes.
|
||||
#
|
||||
# arr_profile_enforcer.sh --sonarr-only
|
||||
# Run only Sonarr enforcement.
|
||||
#
|
||||
# arr_profile_enforcer.sh --radarr-only
|
||||
# Run only Radarr enforcement.
|
||||
#
|
||||
# ==============================================================================================
|
||||
|
||||
|
||||
@@ -28,6 +28,32 @@
|
||||
# terminal or from array_started.sh.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# DESIGN PRINCIPLES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Mode-Aware Paths
|
||||
# Storage mode is read from host*.conf before any symlink is created. Internal
|
||||
# mode (boot) requires no array — symlinks resolve immediately. Appdata mode
|
||||
# requires the array to be mounted before symlinks are useful.
|
||||
#
|
||||
# Migrate on First Run
|
||||
# If live data already exists at /root/.claude and the persistent store is
|
||||
# empty, the live data is moved to persistent storage on first run. Subsequent
|
||||
# runs only re-create the symlinks — migration is one-time.
|
||||
#
|
||||
# No common.sh Dependency
|
||||
# Runs before load_config.sh is available (early in ARRAY_START_SCRIPTS).
|
||||
# All logic is self-contained — no ecosystem functions used.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Conf probe — reads storage mode from Configurations/host*.conf directly
|
||||
# Migration guard — only migrates if persistent store is empty; never overwrites
|
||||
# Symlink-safe — removes existing symlink before re-creating; won't error on re-run
|
||||
#
|
||||
# ==============================================================================================
|
||||
# RUNTIME MODES
|
||||
# ==============================================================================================
|
||||
#
|
||||
|
||||
@@ -20,6 +20,25 @@
|
||||
# know all stopped containers are safe to delete.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# DESIGN PRINCIPLES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Safe Default, Explicit Escalation
|
||||
# The default mode (dangling only) is always safe — running containers are
|
||||
# never affected. The --all mode requires deliberate opt-in and carries an
|
||||
# explicit caution in the description, because it removes stopped containers
|
||||
# that may be intentionally paused.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Root check — Docker prune operations require root
|
||||
# acquire_lock — prevents concurrent prune runs
|
||||
# --dry-run — shows what would be removed without taking any action
|
||||
# --status — lists current dangling images and stopped containers; no changes
|
||||
#
|
||||
# ==============================================================================================
|
||||
# RUNTIME MODES
|
||||
# ==============================================================================================
|
||||
#
|
||||
|
||||
+40
-8
@@ -12,15 +12,47 @@
|
||||
# The listener (start_webhook_listener.sh) must be running before arrs will
|
||||
# actually deliver events, but this script can register the connection first.
|
||||
#
|
||||
# ── WHAT IT DOES ─────────────────────────────────────────────────────────────
|
||||
# 1. Generates WEBHOOK_SECRET in master.conf if empty
|
||||
# 2. Registers webhook in each local arr (Sonarr / Radarr / Lidarr)
|
||||
# 3. SSHes to remote host and runs itself there (unless --local-only)
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL MODEL
|
||||
# ==============================================================================================
|
||||
#
|
||||
# ── USAGE ────────────────────────────────────────────────────────────────────
|
||||
# webhook_setup.sh — configure local + remote
|
||||
# webhook_setup.sh --local-only — local arrs only (used internally for SSH)
|
||||
# webhook_setup.sh --dry-run — show what would be registered
|
||||
# 1. Generate WEBHOOK_SECRET in master.conf if empty
|
||||
# 2. Register webhook in each local arr (Sonarr / Radarr / Lidarr)
|
||||
# 3. SSH to remote host and run itself there (unless --local-only)
|
||||
#
|
||||
# ==============================================================================================
|
||||
# DESIGN PRINCIPLES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Idempotent Registration
|
||||
# Skips any arr that already has the webhook registered. Safe to re-run after
|
||||
# adding a new arr or after a conf change without creating duplicate entries.
|
||||
#
|
||||
# Self-Propagating
|
||||
# SSHes to the remote and runs itself with --local-only — one execution
|
||||
# configures both servers without a separate remote step.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Idempotent — skips arrs that already have the webhook registered
|
||||
# Secret auto-gen — WEBHOOK_SECRET generated if empty; never left blank
|
||||
# --local-only — used internally for SSH; prevents infinite recursion
|
||||
# --dry-run mode — shows what would be registered without making API calls
|
||||
#
|
||||
# ==============================================================================================
|
||||
# RUNTIME MODES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# webhook_setup.sh
|
||||
# Configure local arrs, then SSH to remote and configure remote arrs.
|
||||
#
|
||||
# webhook_setup.sh --local-only
|
||||
# Local arrs only (used internally when called via SSH on the remote).
|
||||
#
|
||||
# webhook_setup.sh --dry-run
|
||||
# Show what would be registered without making any changes.
|
||||
#
|
||||
# ==============================================================================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user