added manual neuclear option to arrs cleanup
This commit is contained in:
+19
-5
@@ -16,7 +16,7 @@
|
||||
#
|
||||
# Section Description
|
||||
# ───────────────────────────────────────────────────────────────────────────────────────────
|
||||
# HOST CONFIGURATION Server hostnames, SSH keys, and Emby connection details
|
||||
# HOST CONFIGURATION Server hostnames, SSH keys, Emby connection details, DATA_DIR
|
||||
# LOGGING Enable or disable verbose logging
|
||||
# NOTIFICATIONS unRAID native and Discord webhook settings
|
||||
# GIT / REPO Gitea repository and SSH settings
|
||||
@@ -90,6 +90,12 @@
|
||||
HOST1="unRAID-Gmer4Lfe"
|
||||
HOST2="unRAID-Jayred365"
|
||||
|
||||
# Data directory — persistent script state and statistics files.
|
||||
# Array share — survives reboots, no flash drive wear.
|
||||
# Created automatically if it doesn't exist.
|
||||
# Only truly critical files (failover state, watchdog reboot log) stay on /boot/config.
|
||||
DATA_DIR="/mnt/user/appdata/unraid_scripts/data"
|
||||
|
||||
# SSH keys for server-to-server rsync and failover container operations.
|
||||
# Both keys must be in /root/.ssh/ and authorised in the remote server's authorized_keys.
|
||||
HOST1_SSH_KEY="/root/.ssh/Gmer4Lfe-rsync-key"
|
||||
@@ -735,7 +741,8 @@ WATCHDOG_SCAN_IGNORE=(
|
||||
# Skip list auto-clears when container recovers healthy
|
||||
WATCHDOG_CONTAINER_RESTART_LIMIT=3 # max watchdog restarts allowed in window
|
||||
WATCHDOG_CONTAINER_RESTART_WINDOW=1 # rolling window in hours
|
||||
WATCHDOG_CONTAINER_RESTART_LOG="/boot/config/container_restart_history.db"
|
||||
WATCHDOG_CONTAINER_RESTART_LOG="$DATA_DIR/container_restart_history.db"
|
||||
# rolling restart history for loop detection
|
||||
|
||||
# Notification batching — one clean summary per cycle instead of one ping per event
|
||||
# true = batch all events into one notification at end of cycle
|
||||
@@ -918,7 +925,7 @@ LIDARR_PROTECTED_PATTERNS=("*.jpg" "*.jpeg" "*.png" "*.nfo" "*.lrc")
|
||||
LIDARR_MAX_DELETE_GB=1 # require --i-know-what-im-doing if deletion exceeds this
|
||||
LIDARR_MIN_TRACKED_PCT=80 # abort if tracked count drops below this % of last run
|
||||
# protects against API returning partial data on a bad day
|
||||
LIDARR_TRACKED_COUNT_FILE="/boot/config/lidarr_tracked.count"
|
||||
LIDARR_TRACKED_COUNT_FILE="$DATA_DIR/lidarr_tracked.count"
|
||||
# persists last known tracked count for percentage comparison
|
||||
|
||||
# ── Sonarr ────────────────────────────────────────────────────────────────────────────────────
|
||||
@@ -946,6 +953,7 @@ declare -A HOST2_SONARR_PATH_MAP=(
|
||||
)
|
||||
|
||||
SONARR_ORPHAN_AGE=7 # days — files must be older than this before eligible for deletion
|
||||
SONARR_MAX_DELETE_GB=1 # require --i-know-what-im-doing if deletion exceeds this
|
||||
SONARR_EXTENSIONS=("mkv" "mp4" "avi" "m4v" "ts" "wmv" "mov")
|
||||
SONARR_PROTECTED_PATTERNS=("*.jpg" "*.jpeg" "*.png" "*.nfo" "*.srt" "*.sub" "*.ass" "*.ssa")
|
||||
# NEVER deleted — cover art, metadata, subtitles
|
||||
@@ -976,6 +984,7 @@ declare -A HOST2_RADARR_PATH_MAP=(
|
||||
)
|
||||
|
||||
RADARR_ORPHAN_AGE=7 # days — files must be older than this before eligible for deletion
|
||||
RADARR_MAX_DELETE_GB=1 # require --i-know-what-im-doing if deletion exceeds this
|
||||
RADARR_EXTENSIONS=("mkv" "mp4" "avi" "m4v" "wmv" "mov")
|
||||
RADARR_PROTECTED_PATTERNS=("*.jpg" "*.jpeg" "*.png" "*.nfo" "*.srt" "*.sub" "*.ass" "*.ssa")
|
||||
# NEVER deleted — cover art, metadata, subtitles
|
||||
@@ -1081,7 +1090,7 @@ HOST2_RADARR_RECOVERY=true # Anime_Movies import recovery
|
||||
# Daily statistics log — read by weekly_health_digest.sh for transcode summary
|
||||
# Tracks peak usage, flip count, session ratio, files cleaned per day
|
||||
# Bounded to TRANSCODE_LOG_RETENTION days — auto-purges old entries on each write
|
||||
TRANSCODE_DAILY_LOG="/boot/config/transcode_daily.db"
|
||||
TRANSCODE_DAILY_LOG="$DATA_DIR/transcode_daily.db"
|
||||
TRANSCODE_LOG_RETENTION=90 # days before old entries are purged
|
||||
|
||||
# ━━━ Transcode Server Array ━━━
|
||||
@@ -1164,10 +1173,15 @@ ZFS_REPORT_IGNORE_POOLS=(
|
||||
# Tracks transfer size, duration and profile per sync for weekly summary reporting.
|
||||
# BANDWIDTH_LOG_RETENTION = days to keep entries before auto-purging old records
|
||||
# BANDWIDTH_WARN_GB = flag in weekly summary if a single sync exceeded this size
|
||||
BANDWIDTH_LOG="/boot/config/bandwidth_history.db"
|
||||
BANDWIDTH_LOG="$DATA_DIR/bandwidth_history.db"
|
||||
BANDWIDTH_LOG_RETENTION=90 # days before old entries are purged
|
||||
BANDWIDTH_WARN_GB=50 # flag syncs larger than this in weekly report
|
||||
|
||||
# Stats files — written by cleanup and recovery scripts, read by coffee report
|
||||
# All in DATA_DIR — array always running when these are written
|
||||
ARR_CLEANUP_STATS="$DATA_DIR/arr_cleanup_stats.db" # lidarr/sonarr/radarr orphan stats
|
||||
ARR_RECOVERY_STATS="$DATA_DIR/arr_recovery_stats.db" # blocklist + re-search stats
|
||||
|
||||
# ━━━ Health Digest ━━━
|
||||
# Aggregated system health summary — reads existing state files, no new writes.
|
||||
# Three profiles control when the digest email is sent:
|
||||
|
||||
Reference in New Issue
Block a user