did way to much,,,,,, mostly added monitors, but almost every file was edited in some way
This commit is contained in:
+86
-56
@@ -7,30 +7,26 @@
|
||||
# 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 in this ecosystem live at:
|
||||
# /mnt/user/appdata/unraid_scripts/
|
||||
#
|
||||
# Configuration for all scripts is managed in one place:
|
||||
# /mnt/user/appdata/unraid_scripts/Master.conf
|
||||
#
|
||||
# Shared runtime functions used by all scripts:
|
||||
# /mnt/user/appdata/unraid_scripts/common.sh
|
||||
# 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 — bandwidth limiting handles concurrency
|
||||
# Typo fixes, --status flag added, full directory tree, changelog added
|
||||
# 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 — Monitor/ folder added with all monitoring scripts
|
||||
# cert_monitor.sh moved from unRAID_Essentials to Monitor/
|
||||
# backup_verify.sh, smart_health.sh, bandwidth_monitor.sh added
|
||||
# weekly_health_digest.sh, emby_session_report.sh added
|
||||
# ZFS memory snapshot moved to Monitor/ — informational only
|
||||
# Directory tree updated to reflect full ecosystem
|
||||
# v1.3 — Failover script added, directory tree updated with Failover folder
|
||||
# v1.4 — WebGUI watchdog, ZFS memory snapshot, Docker network connect added
|
||||
# Recommended schedules section added
|
||||
# v1.5 — media_management.sh orchestrator added to Orchestrators folder
|
||||
# Corrected filenames: media_shares_permissions.sh, user_scripts_stop.sh
|
||||
# Git repo section added
|
||||
# Individual media cleaner entries replaced by media_management.sh
|
||||
# Directory tree updated
|
||||
# ==============================================================================================
|
||||
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -47,9 +43,18 @@
|
||||
# ├── Failover/
|
||||
# │ └── failover.sh # Mutual container failover — runs continuously
|
||||
# │
|
||||
# ├── Monitor/
|
||||
# │ ├── backup_verify.sh # Random sample checksum verification vs remote
|
||||
# │ ├── 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
|
||||
# │ ├── bandwidth_monitor.sh # Daily transfer logging + weekly summary
|
||||
# │ ├── weekly_health_digest.sh # Aggregated system health — always/smart/weekly
|
||||
# │ └── zfs_memory_snapshot.sh # Weekly ZFS health and memory diagnostic report
|
||||
# │
|
||||
# ├── Orchestrators/
|
||||
# │ ├── daily_sync.sh # Runs all daily media share syncs sequentially
|
||||
# │ └── media_management.sh # Runs permissions + anime + media cleaner sequentially
|
||||
# │ └── media_management.sh # Runs permissions + cleaners + arr cleanup sequentially
|
||||
# │
|
||||
# ├── Rsync/
|
||||
# │ ├── rsync.sh # Core rsync script — called per share or profile
|
||||
@@ -63,11 +68,14 @@
|
||||
# │
|
||||
# ├── Media/
|
||||
# │ ├── media_shares_permissions.sh # Applies permissions to all media shares
|
||||
# │ └── media_cleaner.sh # Removes junk files — profiles: anime, media
|
||||
# │ ├── 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
|
||||
# │
|
||||
# ├── Transcodes/
|
||||
# │ ├── ramdisk_setup.sh # Creates ramdisk and transcode symlink — run at array start
|
||||
# │ ├── transcode_manager.sh # Monitors ramdisk usage, manages symlink direction
|
||||
# │ ├── ramdisk_setup.sh # Creates ramdisk and transcode symlink
|
||||
# │ ├── transcode_manager.sh # Monitors ramdisk usage, manages symlink
|
||||
# │ └── transcode_cleanup.sh # Removes old inactive transcode files
|
||||
# │
|
||||
# ├── Tools/
|
||||
@@ -82,34 +90,39 @@
|
||||
# ├── 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 escalating restart
|
||||
# └── zfs_memory_snapshot.sh # Weekly ZFS health and memory diagnostic report
|
||||
# └── webgui_restart.sh # WebGUI watchdog — nginx + emhttp restart
|
||||
#
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# ━━━ 🚀 Script Commands — Uncomment the one you want to run ━━━
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
#
|
||||
# ━━━ Failover (README) ━━━
|
||||
# Runs continuously as a background task — do NOT schedule with a time interval.
|
||||
# Set schedule to "At Startup of Array" — background task.
|
||||
# Both servers must have this script running for mutual failover to work.
|
||||
# Use --status to check current state without restarting the loop.
|
||||
# Runs continuously as background task — set "At Startup of Array" as background task.
|
||||
# Both servers must have this running for mutual failover to work.
|
||||
#
|
||||
# ━━━ Failover ━━━
|
||||
#/mnt/user/appdata/unraid_scripts/Failover/failover.sh
|
||||
#
|
||||
# ━━━ Monitor ━━━
|
||||
#/mnt/user/appdata/unraid_scripts/Monitor/backup_verify.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Monitor/cert_monitor.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Monitor/emby_session_report.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Monitor/smart_health.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Monitor/bandwidth_monitor.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Monitor/weekly_health_digest.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Monitor/zfs_memory_snapshot.sh
|
||||
#
|
||||
# ━━━ Orchestrators ━━━
|
||||
#/mnt/user/appdata/unraid_scripts/Orchestrators/daily_sync.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Orchestrators/media_management.sh
|
||||
#
|
||||
# ━━━ Rsync — Appdata Profiles (scheduled individually) ━━━
|
||||
# ━━━ 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/Media_Server/Emby
|
||||
#/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-Failover/Emby
|
||||
#/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-Failover/Gmer4Lfe
|
||||
#
|
||||
# ━━━ Rsync — Individual Media Shares (ad hoc use) ━━━
|
||||
# ━━━ 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/Anime_Shows
|
||||
@@ -148,51 +161,68 @@
|
||||
#/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
|
||||
#/mnt/user/appdata/unraid_scripts/unRAID_Essentials/zfs_memory_snapshot.sh
|
||||
#
|
||||
# ━━━ Git repo (Gitea) ━━━
|
||||
#/mnt/user/appdata/unraid_scripts/git_pull_execute.sh
|
||||
#
|
||||
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# ━━━ ⚙️ Arguments — Add after the script path ━━━
|
||||
# ━━━ ⚙️ Arguments ━━━
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
#
|
||||
# --dry-run Preview what would happen — no changes made
|
||||
# --log Enable verbose logging output
|
||||
# --no-log Disable logging (overrides Master.conf setting)
|
||||
# --status Print resolved configuration and current state then exit
|
||||
# --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
|
||||
#
|
||||
# ━━━ Failover specific ━━━
|
||||
# failover.sh --status — check current state
|
||||
# failover.sh --dry-run --log — test logic without touching containers
|
||||
# ━━━ 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 first
|
||||
#
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# ━━━ 📋 Recommended Schedules ━━━
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
#
|
||||
# failover.sh — At Startup of Array (background task)
|
||||
# ramdisk_setup.sh — At Startup of Array
|
||||
# docker_network_connect.sh — At Startup of Array
|
||||
# docker_syslog_filter.sh — At Startup of Array
|
||||
# php_fpm_max_children.sh — At Startup of Array
|
||||
# ━━━ At Startup of Array ━━━
|
||||
# failover.sh — background task
|
||||
# ramdisk_setup.sh
|
||||
# docker_network_connect.sh
|
||||
# docker_syslog_filter.sh
|
||||
# php_fpm_max_children.sh
|
||||
#
|
||||
# transcode_manager.sh — */3 * * * * (every 3 minutes)
|
||||
# transcode_cleanup.sh — */5 * * * * (every 5 minutes)
|
||||
# docker_watchdog.sh — */15 * * * * (every 15 minutes)
|
||||
# webgui_restart.sh — */10 * * * * (every 10 minutes)
|
||||
# system_watchdog.sh — */15 * * * * (every 15 minutes)
|
||||
# ━━━ Frequent (every few minutes) ━━━
|
||||
# */3 * * * * transcode_manager.sh
|
||||
# */5 * * * * transcode_cleanup.sh
|
||||
# */10 * * * * webgui_restart.sh
|
||||
# */15 * * * * docker_watchdog.sh
|
||||
# */15 * * * * system_watchdog.sh
|
||||
#
|
||||
# daily_sync.sh — 0 1 * * * (daily at 1am)
|
||||
# docker_daily_restart.sh — 0 3 * * * (daily at 3am)
|
||||
# media_management.sh — 0 2 * * * (daily at 2am)
|
||||
# ━━━ Daily ━━━
|
||||
# 0 1 * * * daily_sync.sh
|
||||
# 0 2 * * * media_management.sh
|
||||
# 0 3 * * * docker_daily_restart.sh
|
||||
# 0 8 * * * weekly_health_digest.sh (profile controls if it sends)
|
||||
#
|
||||
# clear_logs.sh — 0 5 * * 0 (weekly Sunday 5am)
|
||||
# zfs_memory_snapshot.sh — 0 6 * * 0 (weekly Sunday 6am)
|
||||
# docker_weekly_restart.sh — 0 3 * * 0 (weekly Sunday 3am)
|
||||
# ━━━ Weekly — Sunday morning block ━━━
|
||||
# 0 3 * * 0 docker_weekly_restart.sh
|
||||
# 0 5 * * 0 clear_logs.sh
|
||||
# 0 6 * * 0 zfs_memory_snapshot.sh
|
||||
# 0 7 * * 0 smart_health.sh
|
||||
# 0 8 * * 0 weekly_health_digest.sh (weekly profile sends today)
|
||||
# 0 9 * * 0 cert_monitor.sh
|
||||
# 0 10 * * 0 backup_verify.sh
|
||||
# 0 11 * * 0 emby_session_report.sh
|
||||
#
|
||||
# rsync.sh profiles — schedule individually as needed
|
||||
# ━━━ Rsync profiles ━━━
|
||||
# Schedule individually as needed
|
||||
#
|
||||
# ━━━ Bandwidth monitor ━━━
|
||||
# bandwidth_monitor.sh --log-transfer is called automatically by rsync.sh
|
||||
# bandwidth_monitor.sh --report runs standalone for weekly summary
|
||||
#
|
||||
# ==============================================================================================
|
||||
Reference in New Issue
Block a user