fixed reADME AND USER SCRIPT PLUGIN
This commit is contained in:
+103
-49
@@ -27,6 +27,15 @@
|
||||
# weekly_health_digest.sh, emby_session_report.sh added
|
||||
# ZFS memory snapshot moved to Monitors/ — informational only
|
||||
# Directory tree updated to reflect full ecosystem
|
||||
# v1.9 — transcode_management.sh added to Orchestrators/
|
||||
# replaces separate transcode_manager and transcode_cleanup cron entries
|
||||
# Tools/ folder expanded with all utility scripts
|
||||
# Docker watchdog — two-tier monitoring, startup grace, dependency ordering
|
||||
# Failover — tiered failover, DDNS management, handback sequence
|
||||
# Emby Docker mount fix — bind-propagation=shared required in Extra Parameters
|
||||
# transcode_cleanup.sh — transcoding-temp protected from directory deletion
|
||||
# ramdisk_setup.sh — creates transcoding-temp on ramdisk at array start
|
||||
# RAMDISK_SIZE bumped to 10G, thresholds updated
|
||||
# ==============================================================================================
|
||||
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -37,50 +46,64 @@
|
||||
# ├── 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_Template.sh # This file — copy into User Scripts plugin
|
||||
# ├── user_script_plug-in.sh # This file — copy into User Scripts plugin
|
||||
# ├── git_pull_execute.sh # Pulls latest scripts from Gitea repo
|
||||
# │
|
||||
# ├── Failover/
|
||||
# │ ├── failover.sh # Mutual container failover — runs continuously
|
||||
# │ └── failover_test.sh # Controlled failover simulation — run manually
|
||||
# │ ├── failover_test.sh # Controlled failover simulation — run manually
|
||||
# │ └── README-Failover.md
|
||||
# │
|
||||
# ├── Monitors/
|
||||
# │ ├── 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
|
||||
# │ ├── 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
|
||||
# │ ├── zfs_memory_snapshot.sh # Weekly ZFS health and memory diagnostic report
|
||||
# │ └── README-Monitors.md
|
||||
# │
|
||||
# ├── Orchestrators/
|
||||
# │ ├── daily_sync.sh # Runs all daily media share syncs sequentially
|
||||
# │ └── media_management.sh # Runs permissions + cleaners + arr cleanup sequentially
|
||||
# │ ├── media_management.sh # Runs permissions + cleaners + arr cleanup
|
||||
# │ ├── transcode_management.sh # Runs cleanup then manager every 3min + daily stats
|
||||
# │ └── README-Orchestrators.md
|
||||
# │
|
||||
# ├── Rsync/
|
||||
# │ ├── rsync.sh # Core rsync script — called per share or profile
|
||||
# │ └── README_Rsync_Setup.md # Rsync-specific setup guide
|
||||
# │ └── README-Rsync_Setup.md # Rsync-specific setup guide
|
||||
# │
|
||||
# ├── Docker_Essentials/
|
||||
# │ ├── docker_watchdog.sh # Container health monitor — memory, CPU, HTTP, stops
|
||||
# │ ├── 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 # Connects containers to extra networks on boot
|
||||
# │ ├── docker_network_connect.sh # Connects containers to extra networks on boot
|
||||
# │ └── 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
|
||||
# │ ├── radarr_cleanup.sh # Removes orphaned movie files via Radarr API
|
||||
# │ └── README-Media.md
|
||||
# │
|
||||
# ├── Transcodes/
|
||||
# │ ├── ramdisk_setup.sh # Creates ramdisk and transcode symlink
|
||||
# │ ├── ramdisk_setup.sh # Creates ramdisk, symlink, and transcoding-temp
|
||||
# │ ├── transcode_manager.sh # Monitors ramdisk usage, manages symlink
|
||||
# │ └── transcode_cleanup.sh # Removes old inactive transcode files
|
||||
# │ ├── transcode_cleanup.sh # Removes old inactive transcode files
|
||||
# │ └── README-Transcoding.md
|
||||
# │
|
||||
# ├── Tools/
|
||||
# │ └── recreate_shares.sh # Recreates share dirs from .cfg files after incident
|
||||
# │ ├── 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
|
||||
@@ -91,14 +114,30 @@
|
||||
# ├── 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
|
||||
# ├── 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 ━━━
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
#
|
||||
# ━━━ Failover (README) ━━━
|
||||
# Runs continuously as background task — set "At Startup of Array" as background task.
|
||||
# ━━━ Failover ━━━
|
||||
# Runs continuously as background task — set schedule to "At Startup of Array (Background)".
|
||||
# Both servers must have this running for mutual failover to work.
|
||||
#
|
||||
#/mnt/user/appdata/unraid_scripts/Failover/failover.sh
|
||||
@@ -106,23 +145,23 @@
|
||||
# ━━━ Failover Test ━━━
|
||||
# Run manually during a maintenance window — starts and stops real containers.
|
||||
# Always --dry-run first to walk through phases without making changes.
|
||||
# Both servers must have failover.sh running before testing.
|
||||
#
|
||||
#/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/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/bandwidth_monitor.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Monitors/weekly_health_digest.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Monitors/zfs_memory_snapshot.sh
|
||||
#
|
||||
# ━━━ Orchestrators ━━━
|
||||
#/mnt/user/appdata/unraid_scripts/Orchestrators/daily_sync.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Orchestrators/media_management.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Orchestrators/transcode_management.sh
|
||||
#
|
||||
# ━━━ Rsync — Appdata Profiles ━━━
|
||||
#/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-Failover/Arrs_Stack
|
||||
@@ -153,12 +192,23 @@
|
||||
#/mnt/user/appdata/unraid_scripts/Docker_Essentials/docker_network_connect.sh
|
||||
#
|
||||
# ━━━ Transcodes ━━━
|
||||
# transcode_management.sh replaces separate manager and cleanup cron entries.
|
||||
# ramdisk_setup.sh runs once at array start — separate User Script entry.
|
||||
#
|
||||
#/mnt/user/appdata/unraid_scripts/Transcodes/ramdisk_setup.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Transcodes/transcode_manager.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Transcodes/transcode_cleanup.sh
|
||||
#/mnt/user/appdata/unraid_scripts/Orchestrators/transcode_management.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
|
||||
@@ -187,51 +237,55 @@
|
||||
# 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 first
|
||||
# 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
|
||||
# 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
|
||||
#
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# ━━━ 📋 Recommended Schedules ━━━
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
#
|
||||
# ━━━ At Startup of Array ━━━
|
||||
# failover.sh — background task
|
||||
# ramdisk_setup.sh
|
||||
# docker_network_connect.sh
|
||||
# docker_syslog_filter.sh
|
||||
# php_fpm_max_children.sh
|
||||
# failover.sh — background task (continuous loop)
|
||||
# ramdisk_setup.sh — creates ramdisk before Emby starts
|
||||
# docker_network_connect.sh — connect containers to extra networks
|
||||
# docker_syslog_filter.sh — suppress veth noise before logs fill
|
||||
# php_fpm_max_children.sh — WebGUI performance tuning
|
||||
#
|
||||
# ━━━ Frequent (every few minutes) ━━━
|
||||
# */3 * * * * transcode_manager.sh
|
||||
# */5 * * * * transcode_cleanup.sh
|
||||
# */10 * * * * webgui_restart.sh
|
||||
# */15 * * * * docker_watchdog.sh
|
||||
# */15 * * * * system_watchdog.sh
|
||||
# ━━━ Frequent (cron) ━━━
|
||||
# */3 * * * * transcode_management.sh (replaces separate manager + cleanup entries)
|
||||
# */10 * * * * webgui_restart.sh
|
||||
# */15 * * * * docker_watchdog.sh
|
||||
# */15 * * * * system_watchdog.sh
|
||||
#
|
||||
# ━━━ 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)
|
||||
# 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)
|
||||
#
|
||||
# ━━━ 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
|
||||
# 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
|
||||
# 0 11 * * 0 bandwidth_monitor.sh --report
|
||||
#
|
||||
# ━━━ Rsync profiles ━━━
|
||||
# Schedule individually as needed
|
||||
# Schedule individually based on how frequently appdata needs syncing
|
||||
#
|
||||
# ━━━ Bandwidth monitor ━━━
|
||||
# bandwidth_monitor.sh --log-transfer is called automatically by rsync.sh
|
||||
# bandwidth_monitor.sh --log-transfer called automatically by rsync.sh
|
||||
# bandwidth_monitor.sh --report runs standalone for weekly summary
|
||||
#
|
||||
# ==============================================================================================
|
||||
Reference in New Issue
Block a user