#!/bin/bash # ============================================================================================== # ================================= User Script Template ======================================= # ============================================================================================== # # This file is the master template for all scripts run via the unRAID User Scripts plugin. # Copy and paste the contents of this file into a new User Script entry in the plugin, # then uncomment the script you want to run and set your schedule. # # All scripts live at: /mnt/user/appdata/unraid_scripts/ # All configuration at: /mnt/user/appdata/unraid_scripts/Master.conf # Shared functions at: /mnt/user/appdata/unraid_scripts/common.sh # # ============================================================================================== # Changelog: # v1.0 — Initial template # v1.1 — MAX_RSYNC_PROCS removed, --status flag, full directory tree, changelog # v1.2 — Docker Essentials, Media, Transcodes, System Watchdog added # v1.3 — Failover script added # v1.4 — WebGUI watchdog, ZFS snapshot, Docker network connect, schedules section # v1.5 — media_management.sh orchestrator, corrected filenames, git repo section # v1.6 — lidarr_cleanup.sh, sonarr_cleanup.sh, radarr_cleanup.sh added # v1.7 — cert_monitor.sh added # v1.8 — Monitors/ folder added with all monitoring scripts # v1.9 — transcode_management.sh added to Orchestrators/ # v2.0 — Major restructure: array_start.sh single entry point, daily/weekly orchestrators, # sunday_morning_coffee_report.sh, continuous_scripts_status.sh, # downloaders_reset.sh, docker_network_connect ensure+connect combined, # inotify_tuning.sh, arr path translation, version checking, nuclear mode flags # v2.1 — critical_sync_maintenance.sh added, Partnership/ folder added, # DAILY_MAINTENANCE_SCRIPTS consolidates all daily jobs, # WEEKLY_SYNC_SHARES renamed from WEEKLY_SYNC_JOBS, # CRITICAL_MAINTENANCE_SCRIPTS + CRITICAL_SYNC_SHARES added, # downloaders_reset moved to CRITICAL_MAINTENANCE_SCRIPTS, # system_tuning_monitor.sh added to Monitors/, # rsync_stop.sh auto-detects orchestrators via /proc children, # check_remote_disks() auto-detects XFS/ZFS from disks.ini, # temp check reads thresholds from dynamix.cfg, # WEEKLY_SYNC_UPDATES renamed from CRITICAL_SYNC_UPDATES # ============================================================================================== # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # ━━━ 📂 Repository Structure ━━━ # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # # /mnt/user/appdata/unraid_scripts/ # ├── Master.conf # All user configuration — edit this file only # ├── common.sh # Shared library — functions used by all scripts # ├── README.md # Project overview and quick start # ├── user_script_plug-in.sh # This file — copy into User Scripts plugin # ├── git_pull_execute.sh # Pulls latest scripts from Gitea repo # │ # ├── Partnership/ # │ ├── partnership_manage.sh # Lifecycle manager — onboard/offboard/transfer/check # │ └── README-Partnership.md # │ # ├── Failover/ # │ ├── failover.sh # Mutual container failover — runs continuously # │ ├── failover_test.sh # Controlled failover simulation — run manually # │ └── README-Failover.md # │ # ├── Monitors/ # │ ├── continuous_scripts_status.sh # Live status of all continuous loop scripts — run manually # │ ├── backup_verify.sh # Random sample checksum verification vs remote # │ ├── bandwidth_monitor.sh # Daily transfer logging + weekly summary # │ ├── cert_monitor.sh # SSL certificate expiry — direct openssl check # │ ├── emby_session_report.sh # Weekly Emby usage statistics via API # │ ├── smart_health.sh # Drive SMART attribute monitoring # │ ├── system_tuning_monitor.sh # inotify + php-fpm usage tracking — every 6hr # │ ├── weekly_health_digest.sh # Aggregated system health — always/smart/weekly # │ ├── zfs_memory_snapshot.sh # Weekly ZFS health and memory diagnostic report # │ └── README-Monitors.md # │ # ├── Orchestrators/ # │ ├── array_start.sh # Single entry point — launches all array-start scripts # │ ├── daily_sync_maintenance.sh # Daily — git pull, media sync, maintenance jobs, docker restart # │ ├── weekly_sync_maintenance.sh # Weekly — Emby + auth sync, updates, weekly restart # │ ├── critical_sync_maintenance.sh # Every 15min — downloaders reset, auth sync, partnership check # │ ├── transcode_management.sh # Every 3min — cleanup then manager in correct order # │ ├── sunday_morning_coffee_report.sh # Sunday 7am — full weekly system health report # │ └── README-Orchestrators.md # │ # ├── Rsync/ # │ ├── rsync.sh # Core rsync script — called per share or profile # │ ├── rsync_stop.sh # Stops rsync + orchestrators — auto-detects via /proc # │ └── README-Rsync_Setup.md # │ # ├── Docker_Essentials/ # │ ├── docker_watchdog.sh # Two-tier container health monitor — self-healing # │ ├── docker_daily_restart.sh # Restarts configured containers daily # │ ├── docker_weekly_restart.sh # Restarts configured containers weekly # │ ├── docker_network_connect.sh # Ensures custom networks exist + connects containers # │ ├── downloaders_reset.sh # Every 15min reset for slskd, SABnzbd, qBittorrent # │ └── README-Docker_Essentials.md # │ # ├── Media/ # │ ├── media_shares_permissions.sh # Applies permissions to all media shares # │ ├── media_cleaner.sh # Removes junk files — profiles: anime, media # │ ├── lidarr_cleanup.sh # Removes orphaned music files via Lidarr API # │ ├── sonarr_cleanup.sh # Removes orphaned TV files via Sonarr API # │ ├── radarr_cleanup.sh # Removes orphaned movie files via Radarr API # │ ├── arrs_failed_stalled_recovery.sh # Auto blocklist + re-search failed/stalled downloads # │ └── README-Media.md # │ # ├── Transcodes/ # │ ├── ramdisk_setup.sh # Creates ramdisk + symlink — runs at array start # │ ├── transcode_manager.sh # Monitors ramdisk usage, manages symlink direction # │ ├── transcode_cleanup.sh # Removes old inactive transcode files # │ └── README-Transcoding.md # │ # ├── Tools/ # │ ├── bulk_permissions_repair.sh # Targeted permission repair for one share # │ ├── container_data_export.sh # Export container appdata to tar archive # │ ├── emby_database_repair.sh # SQLite integrity check on Emby databases # │ ├── failover_state_reset.sh # Reset failover state file to NORMAL # │ ├── recreate_shares.sh # Recreates share dirs from .cfg files after incident # │ ├── watchdog_skip_list_manager.sh # Manage container watchdog skip lists # │ ├── zfs_pool_scrub.sh # Trigger ZFS scrub with completion report # │ └── README-Tools.md # │ # └── unRAID_Essentials/ # ├── clear_logs.sh # Clears unRAID system and Docker log files # ├── docker_syslog_filter.sh # Filters Docker veth noise from syslog # ├── inotify_tuning.sh # Bumps inotify limits — prevents file event exhaustion # ├── mover_stop.sh # Safely stops the unRAID mover # ├── php_fpm_max_children.sh # Sets PHP-FPM max children value # ├── server_reboot.sh # Graceful server reboot with user warning # ├── system_watchdog.sh # System health monitor — last line of defense # ├── user_scripts_stop.sh # Stops running User Scripts plugin jobs # ├── webgui_restart.sh # WebGUI watchdog — nginx + emhttp restart # └── README-Unraid_Essentials.md # # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # ━━━ ⚠️ Critical Setup Notes ━━━ # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # # EMBY TRANSCODE DOCKER MOUNT — MUST USE EXTRA PARAMETERS: # Do NOT add /mnt/ram-transcode as a standard path mapping in the Emby template. # Standard bind mounts use rprivate propagation — Docker locks the mount inode on # the first symlink flip and new sessions land on SSD permanently for that run. # # In Emby Extra Parameters add: # --mount type=bind,source=/mnt/ram-transcode,target=/ext-ram-transcode,bind-propagation=shared # # shared propagation means host symlink changes are visible inside the container # in real time — symlink flips work correctly for the lifetime of the container. # # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # ━━━ 🚀 Script Commands — Uncomment the one you want to run ━━━ # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # ━━━ Orchestrators ━━━ # Orchestrators are the main runtime engines — they handle everything within their domain # in the correct order automatically. Individual scripts below can still be run manually. # # array_start.sh — At Startup of Array — single entry, launches everything # Configurable via ARRAY_START_SCRIPTS in Master.conf # # daily_sync_maintenance.sh — 0 1 * * * (1am daily) # media share sync → DAILY_MAINTENANCE_SCRIPTS jobs # git pull, permissions, cleaners, arr cleanup, docker restart # # weekly_sync_maintenance.sh — 30 2 * * 0 (Sunday 2:30am) # stop containers → updates → WEEKLY_SYNC_SHARES → # restart → WEEKLY_MAINTENANCE_SCRIPTS # # critical_sync_maintenance.sh — */15 * * * * (every 15 minutes) # CRITICAL_MAINTENANCE_SCRIPTS → CRITICAL_SYNC_SHARES → # partnership --check # downloaders reset, auth stack sync, Emby dirty sync # # transcode_management.sh — */3 * * * * (every 3 minutes) # transcode cleanup → transcode manager (correct order) # # sunday_morning_coffee_report.sh — 0 7 * * 0 (Sunday 7am) # full weekly system health report — ready when you wake up ☕ # # arrs_failed_stalled_recovery.sh — 0 */6 * * * (every 6 hours) # blocklist + re-search failed imports and stalled downloads # # system_tuning_monitor.sh — 0 */6 * * * (every 6 hours) # snapshot inotify + php-fpm — feeds sunday coffee report # #/mnt/user/appdata/unraid_scripts/Orchestrators/array_start.sh #/mnt/user/appdata/unraid_scripts/Orchestrators/daily_sync_maintenance.sh #/mnt/user/appdata/unraid_scripts/Orchestrators/weekly_sync_maintenance.sh #/mnt/user/appdata/unraid_scripts/Orchestrators/critical_sync_maintenance.sh #/mnt/user/appdata/unraid_scripts/Orchestrators/transcode_management.sh #/mnt/user/appdata/unraid_scripts/Orchestrators/sunday_morning_coffee_report.sh #/mnt/user/appdata/unraid_scripts/Media/arrs_failed_stalled_recovery.sh #/mnt/user/appdata/unraid_scripts/Monitors/system_tuning_monitor.sh # ━━━ Partnership ━━━ #/mnt/user/appdata/unraid_scripts/Partnership/partnership_manage.sh --status #/mnt/user/appdata/unraid_scripts/Partnership/partnership_manage.sh --onboard --dry-run #/mnt/user/appdata/unraid_scripts/Partnership/partnership_manage.sh --onboard #/mnt/user/appdata/unraid_scripts/Partnership/partnership_manage.sh --offboard --dry-run #/mnt/user/appdata/unraid_scripts/Partnership/partnership_manage.sh --offboard #/mnt/user/appdata/unraid_scripts/Partnership/partnership_manage.sh --transfer --dry-run #/mnt/user/appdata/unraid_scripts/Partnership/partnership_manage.sh --transfer --confirm=i-understand-this-transfers-ownership # ━━━ Failover ━━━ # Runs continuously — launched by array_start.sh via ARRAY_START_SCRIPTS. # Run manually only for testing or if array_start.sh is not in use. # #/mnt/user/appdata/unraid_scripts/Failover/failover.sh #/mnt/user/appdata/unraid_scripts/Failover/failover_test.sh --dry-run #/mnt/user/appdata/unraid_scripts/Failover/failover_test.sh # ━━━ Monitors ━━━ #/mnt/user/appdata/unraid_scripts/Monitors/continuous_scripts_status.sh # ^^ run manually anytime — live status of system_watchdog, docker_watchdog, failover #/mnt/user/appdata/unraid_scripts/Monitors/system_tuning_monitor.sh # ^^ run manually for live snapshot — scheduled every 6hr via cron #/mnt/user/appdata/unraid_scripts/Monitors/backup_verify.sh #/mnt/user/appdata/unraid_scripts/Monitors/bandwidth_monitor.sh --report #/mnt/user/appdata/unraid_scripts/Monitors/cert_monitor.sh #/mnt/user/appdata/unraid_scripts/Monitors/emby_session_report.sh #/mnt/user/appdata/unraid_scripts/Monitors/smart_health.sh #/mnt/user/appdata/unraid_scripts/Monitors/weekly_health_digest.sh #/mnt/user/appdata/unraid_scripts/Monitors/zfs_memory_snapshot.sh # ━━━ Rsync — Appdata Profiles ━━━ #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-Failover/Arrs_Stack #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-Failover/Critical-Data #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-Failover/Important-Data #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-Failover/Gmer4Lfe #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Media_Server/Emby --profile=emby-failover # ^^ dirty sync — Emby stays running — called by critical_sync_maintenance.sh every 15min #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Media_Server/Emby # ^^ do NOT schedule — called by weekly_sync_maintenance.sh Sunday 2:30am only #/mnt/user/appdata/unraid_scripts/Rsync/rsync_stop.sh # ^^ smart stop — auto-detects orchestrators via /proc, rsync-only if orchestrator running #/mnt/user/appdata/unraid_scripts/Rsync/rsync_stop.sh --full-stop # ^^ nuclear — kills orchestrator first then rsync # ━━━ Rsync — Individual Media Shares (ad hoc) ━━━ #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Movies #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Tv_Shows #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Music #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Music_Videos #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Anime_Shows #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Anime_Shows-Old #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Anime_Movies #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Anime_Movies-Old #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Books #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Intros #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Kids_Movies #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Kids_Tv_Shows #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Nextcloud #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/Sports #/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/stand-up_comedy # ━━━ Docker Essentials ━━━ #/mnt/user/appdata/unraid_scripts/Docker_Essentials/docker_watchdog.sh # ^^ runs continuously — launched by array_start.sh #/mnt/user/appdata/unraid_scripts/Docker_Essentials/docker_daily_restart.sh # ^^ called by daily_sync_maintenance.sh via DAILY_MAINTENANCE_SCRIPTS #/mnt/user/appdata/unraid_scripts/Docker_Essentials/docker_weekly_restart.sh # ^^ called by weekly_sync_maintenance.sh via WEEKLY_MAINTENANCE_SCRIPTS #/mnt/user/appdata/unraid_scripts/Docker_Essentials/docker_network_connect.sh # ^^ ensures custom networks exist + connects containers — called by array_start.sh #/mnt/user/appdata/unraid_scripts/Docker_Essentials/downloaders_reset.sh --dry-run #/mnt/user/appdata/unraid_scripts/Docker_Essentials/downloaders_reset.sh # ^^ called by critical_sync_maintenance.sh every 15min via CRITICAL_MAINTENANCE_SCRIPTS # ━━━ Media ━━━ # All media jobs run via DAILY_MAINTENANCE_SCRIPTS — scripts below for manual runs only. # Always --dry-run first on arr cleanup scripts. # #/mnt/user/appdata/unraid_scripts/Media/media_shares_permissions.sh #/mnt/user/appdata/unraid_scripts/Media/media_cleaner.sh anime --dry-run #/mnt/user/appdata/unraid_scripts/Media/media_cleaner.sh anime #/mnt/user/appdata/unraid_scripts/Media/media_cleaner.sh media --dry-run #/mnt/user/appdata/unraid_scripts/Media/media_cleaner.sh media #/mnt/user/appdata/unraid_scripts/Media/lidarr_cleanup.sh --dry-run --log #/mnt/user/appdata/unraid_scripts/Media/lidarr_cleanup.sh #/mnt/user/appdata/unraid_scripts/Media/lidarr_cleanup.sh --i-know-what-im-doing --skip-strike-list #/mnt/user/appdata/unraid_scripts/Media/sonarr_cleanup.sh --dry-run --log #/mnt/user/appdata/unraid_scripts/Media/sonarr_cleanup.sh #/mnt/user/appdata/unraid_scripts/Media/radarr_cleanup.sh --dry-run --log #/mnt/user/appdata/unraid_scripts/Media/radarr_cleanup.sh #/mnt/user/appdata/unraid_scripts/Media/arrs_failed_stalled_recovery.sh --dry-run #/mnt/user/appdata/unraid_scripts/Media/arrs_failed_stalled_recovery.sh # ━━━ Transcodes ━━━ # transcode_management.sh runs cleanup then manager — schedule that, not the individuals. # ramdisk_setup.sh runs once at array start via ARRAY_START_SCRIPTS. # #/mnt/user/appdata/unraid_scripts/Transcodes/ramdisk_setup.sh #/mnt/user/appdata/unraid_scripts/Orchestrators/transcode_management.sh #/mnt/user/appdata/unraid_scripts/Transcodes/transcode_manager.sh --dry-run #/mnt/user/appdata/unraid_scripts/Transcodes/transcode_manager.sh #/mnt/user/appdata/unraid_scripts/Transcodes/transcode_cleanup.sh --dry-run #/mnt/user/appdata/unraid_scripts/Transcodes/transcode_cleanup.sh # ━━━ Tools ━━━ #/mnt/user/appdata/unraid_scripts/Tools/bulk_permissions_repair.sh /mnt/user/ShareName #/mnt/user/appdata/unraid_scripts/Tools/container_data_export.sh ContainerName /path/to/appdata /path/to/output #/mnt/user/appdata/unraid_scripts/Tools/emby_database_repair.sh #/mnt/user/appdata/unraid_scripts/Tools/failover_state_reset.sh --status #/mnt/user/appdata/unraid_scripts/Tools/failover_state_reset.sh #/mnt/user/appdata/unraid_scripts/Tools/recreate_shares.sh #/mnt/user/appdata/unraid_scripts/Tools/watchdog_skip_list_manager.sh --status #/mnt/user/appdata/unraid_scripts/Tools/watchdog_skip_list_manager.sh --clear ContainerName #/mnt/user/appdata/unraid_scripts/Tools/watchdog_skip_list_manager.sh --clear-all #/mnt/user/appdata/unraid_scripts/Tools/zfs_pool_scrub.sh # ━━━ unRAID Essentials ━━━ #/mnt/user/appdata/unraid_scripts/unRAID_Essentials/clear_logs.sh #/mnt/user/appdata/unraid_scripts/unRAID_Essentials/docker_syslog_filter.sh #/mnt/user/appdata/unraid_scripts/unRAID_Essentials/inotify_tuning.sh #/mnt/user/appdata/unraid_scripts/unRAID_Essentials/mover_stop.sh #/mnt/user/appdata/unraid_scripts/unRAID_Essentials/php_fpm_max_children.sh #/mnt/user/appdata/unraid_scripts/unRAID_Essentials/server_reboot.sh #/mnt/user/appdata/unraid_scripts/unRAID_Essentials/system_watchdog.sh #/mnt/user/appdata/unraid_scripts/unRAID_Essentials/user_scripts_stop.sh #/mnt/user/appdata/unraid_scripts/unRAID_Essentials/webgui_restart.sh # ━━━ Git ━━━ #/mnt/user/appdata/unraid_scripts/git_pull_execute.sh # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # ━━━ ⚙️ Arguments ━━━ # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # # --dry-run Preview what would happen — no changes made # --log Enable verbose logging output # --no-log Disable logging (overrides Master.conf) # --status Print resolved config and current state then exit # --help Show usage information # KEY=VALUE Override any Master.conf variable for this run only # # ━━━ Special arguments ━━━ # failover.sh --status — check current state without restarting loop # failover.sh --dry-run --log — test logic without touching containers # media_cleaner.sh anime --dry-run — profile required as first argument # bandwidth_monitor.sh --report — generate weekly summary report # lidarr/sonarr/radarr --dry-run --log — always test arr cleanup before running live # lidarr/sonarr/radarr --i-know-what-im-doing --skip-strike-list — nuclear mode # transcode_management.sh --dry-run — passes through to both child scripts # watchdog_skip_list_manager.sh --status — view skip list and restart history # watchdog_skip_list_manager.sh --clear Name — clear specific container # failover_state_reset.sh --status — view current failover state file # rsync_stop.sh — smart stop, auto-detects what is running # rsync_stop.sh --full-stop — nuclear, kills orchestrator first # partnership_manage.sh --status — show current partnership state # partnership_manage.sh --check — called automatically every 15min, do not run manually # # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # ━━━ 📋 Recommended Schedules ━━━ # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # # ━━━ At Startup of Array ━━━ # array_start.sh — single entry point, launches everything below # configure what runs in ARRAY_START_SCRIPTS in Master.conf # # Launched by array_start.sh (configured via ARRAY_START_SCRIPTS): # ramdisk_setup.sh — creates ramdisk before Emby starts (one-shot) # docker_syslog_filter.sh — suppress veth noise before logs fill (one-shot) # php_fpm_max_children.sh — WebGUI performance tuning (one-shot) # inotify_tuning.sh — bump inotify limits (one-shot) # docker_network_connect.sh — ensure custom networks exist + connect (one-shot) # system_watchdog.sh — system health monitor (continuous) # docker_watchdog.sh — container health monitor (continuous) # failover.sh — mutual failover (continuous) — enable when HOST2 ready # # ━━━ Every 3 minutes ━━━ # */3 * * * * transcode_management.sh (cleanup + manager — correct order) # # ━━━ Every 15 minutes ━━━ # */15 * * * * critical_sync_maintenance.sh (downloaders reset + auth sync + partnership check) # # ━━━ Every 6 hours ━━━ # 0 */6 * * * arrs_failed_stalled_recovery.sh (blocklist + re-search failed/stalled) # 0 */6 * * * system_tuning_monitor.sh (inotify + php-fpm snapshot) # # ━━━ Daily ━━━ # 0 1 * * * daily_sync_maintenance.sh (git pull + media sync + maintenance + restart) # 0 8 * * * weekly_health_digest.sh (profile controls if/when it sends) # # ━━━ Weekly ━━━ # 30 2 * * 0 weekly_sync_maintenance.sh (Emby + auth sync + updates + weekly restart) # 0 7 * * 0 sunday_morning_coffee_report.sh (full weekly health report — Sunday 7am) # # ━━━ Manual only ━━━ # continuous_scripts_status.sh (live status of all watchdogs + failover) # rsync_stop.sh (stop rsync — smart auto-detect) # rsync_stop.sh --full-stop (stop everything including orchestrator) # partnership_manage.sh --onboard (set up mirror relationship) # partnership_manage.sh --offboard (clean separation — either server) # partnership_manage.sh --transfer (flip ownership — owner only) # # ━━━ Rsync profiles — individual schedules ━━━ # Arrs_Stack — daily or every few days (arr databases change on every download) # Critical-Data — handled by critical_sync_maintenance.sh every 15min — no separate schedule # Important-Data — daily (NextCloud file changes) # Gmer4Lfe — daily or weekly (personal appdata) # Emby — handled by weekly_sync_maintenance.sh Sunday 2:30am — no separate schedule # emby-failover — handled by critical_sync_maintenance.sh every 15min — no separate schedule # # ==============================================================================================