rename: appdata/varaverk → appdata/Varaverk (capital V throughout)

This commit is contained in:
Gmer4Lfe
2026-05-30 10:22:51 -04:00
parent 2d5a084d2b
commit 0fe99cf2a9
24 changed files with 641 additions and 385 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
"hooks": [
{
"type": "command",
"command": "bash '/mnt/cloud-storage/Important Shit/Git/Development/varaverk/Deployment/deploy.sh'"
"command": "bash '/mnt/cloud-storage/Important Shit/Git/Development/Varaverk/Deployment/deploy.sh'"
}
]
}
+6
View File
@@ -79,6 +79,12 @@
HOST1_OWNER="gmer4lfe"
HOST1_OWNER_EMAIL="gmer4lfe@gmail.com"
# ━━━ Unraid API ━━━
# Local API key used by the Varaverk plugin to query this server's Unraid GraphQL API.
# Used for remote host monitoring in the partner card — HOST2 uses HOST2_UNRAID_API_KEY.
# Generate in Unraid: Settings → Management Access → API Keys → + New Key
HOST1_UNRAID_API_KEY="8282344978921ef157abf11e0e9f59bc89201f621ccf3bf2c5333b6a13fdde6e"
# ━━━ Emby ━━━
# Referenced by transcode_manager.sh, emby_session_report.sh, emby_database_repair.sh,
# weekly_sync_maintenance.sh, and HOST1_TRANSCODE_SERVERS below.
+4
View File
@@ -81,6 +81,10 @@
HOST2_OWNER="jayred365"
HOST2_OWNER_EMAIL="" # fill in when HOST2 is back online
# ━━━ Unraid API ━━━
# Generate in Unraid: Settings → Management Access → API Keys → + New Key
HOST2_UNRAID_API_KEY="2bdf5119d61eefa3023434748bd1c171bd23dc0b2ebc8586e24abe07df986acc"
# ━━━ Emby ━━━
# Referenced by transcode_manager.sh, emby_session_report.sh, emby_database_repair.sh,
# weekly_sync_maintenance.sh, and HOST2_TRANSCODE_SERVERS below.
+2 -2
View File
@@ -115,7 +115,7 @@
# Array share — survives reboots, no flash drive wear.
# Created automatically if it doesn't exist.
# Only truly critical files (fallback state, watchdog reboot log) stay on /boot/config.
DATA_DIR="/mnt/user/appdata/varaverk/data"
DATA_DIR="/mnt/user/appdata/Varaverk/data"
# ── Version Parity ──
# Controls behaviour when local and remote unRAID versions differ.
@@ -250,7 +250,7 @@
GITEA_CONTAINER="Gitea"
GITEA_REPO_PATH="FailedProxy/Varaverk.git"
GITEA_DOMAIN="" # e.g. git.yourdomain.com — requires NPM + DNS
TARGET_DIR="/mnt/user/appdata/varaverk"
TARGET_DIR="/mnt/user/appdata/Varaverk"
GITEA_SSH_KEY="/root/.ssh/unraid_gitea"
SSH_PORT=221 # Gitea SSH port (default 22, Gitea often uses 221/222)
GITEA_HTTP_PORT=3000 # Gitea web/API port — used by gitea_ssh_setup.sh
+2 -2
View File
@@ -115,7 +115,7 @@
# Array share — survives reboots, no flash drive wear.
# Created automatically if it doesn't exist.
# Only truly critical files (fallback state, watchdog reboot log) stay on /boot/config.
DATA_DIR="/mnt/user/appdata/varaverk/data"
DATA_DIR="/mnt/user/appdata/Varaverk/data"
# ── Version Parity ──
# Controls behaviour when local and remote unRAID versions differ.
@@ -250,7 +250,7 @@
GITEA_CONTAINER="Gitea"
GITEA_REPO_PATH="FailedProxy/Varaverk.git"
GITEA_DOMAIN="" # e.g. git.yourdomain.com — requires NPM + DNS
TARGET_DIR="/mnt/user/appdata/varaverk"
TARGET_DIR="/mnt/user/appdata/Varaverk"
GITEA_SSH_KEY="/root/.ssh/unraid_gitea"
SSH_PORT=221 # Gitea SSH port (default 22, Gitea often uses 221/222)
GITEA_HTTP_PORT=3000 # Gitea web/API port — used by gitea_ssh_setup.sh
+54 -15
View File
@@ -1,29 +1,68 @@
#!/bin/bash
# ==============================================================================================
# conf_upgrade.sh — Merge new conf structure into an existing conf while preserving user values.
# ============================= conf_upgrade.sh ================================================
# ==============================================================================================
#
# Usage:
# conf_upgrade.sh --template <template.conf> --target <target.conf> [--dry-run] [--backup]
# PURPOSE
# ─────────────────────────────────────────────────────────────────────────────
# Merges a new conf template into an existing user conf while preserving every
# value the user has already set. Run manually when the conf schema changes
# between versions — adds new keys, removes deprecated ones, and keeps the
# structure of the new template exactly.
#
# What it does:
# Keys in template only → ADDED with template's placeholder/default — user fills in once
# Keys in target only → REMOVED — deprecated in new version
# • Keys in both → KEPT — target's value always preserved, template's ignored
# • Comments / blank lines → always from template (structure follows new version)
# Keys in template only → ADDED (placeholder/default — user fills in once)
# Keys in target only → REMOVED (deprecated in new version)
# Keys in both → KEPT (target's value always wins, template ignored)
# Comments / blank lines → always from template (structure follows new version)
#
# Supports all conf variable patterns:
# Simple scalar: KEY="value"
# Indexed array: KEY=(\n "item"\n)
# Associative array: declare -A KEY=(\n ["k"]="v"\n)
# Supports all conf variable patterns: simple scalars, indexed arrays, and
# associative arrays (declare -A).
#
# Options:
# --template New version conf file (source of structure and defaults)
# --target Existing user conf (source of real values — preserved)
# ==============================================================================================
# OPERATIONAL SAFEGUARDS
# ==============================================================================================
#
# Dry-run Mode
# --dry-run prints the full change report (ADDED / REMOVED / KEPT) then exits
# without writing anything. Always preview before applying to production confs.
#
# Backup Option
# --backup writes a .bak copy of the target before overwriting. Use when
# applying to a conf that has never been upgraded before.
#
# File Existence Guards
# Both --template and --target are validated before any parsing begins.
# Missing files abort immediately with a clear error.
#
# Atomic Write
# Merged output is written to a tempfile first, then copied to the target.
# A partial write cannot corrupt the original.
#
# ==============================================================================================
# CONFIGURATION
# ==============================================================================================
#
# No conf vars. All inputs are CLI flags.
#
# --template <file> New version conf file (source of structure and defaults)
# --target <file> Existing user conf (source of real values — always preserved)
# --dry-run Show what would change without writing
# --backup Write a .bak copy of target before modifying
#
# ==============================================================================================
# RUNTIME MODES
# ==============================================================================================
#
# conf_upgrade.sh --template master.conf.template --target Configurations/master.conf --dry-run
# Preview what would be added, removed, and kept — no changes written.
#
# conf_upgrade.sh --template master.conf.template --target Configurations/master.conf --backup
# Apply the upgrade, writing a .bak first.
#
# conf_upgrade.sh --template master.conf.template --target Configurations/master.conf
# Apply the upgrade in-place with no backup.
#
# ==============================================================================================
set -uo pipefail
+2 -2
View File
@@ -13,8 +13,8 @@
#
# ==============================================================================================
DEV_ROOT="/mnt/cloud-storage/Important Shit/Git/Development/varaverk"
PROD_ROOT="/mnt/user/appdata/varaverk"
DEV_ROOT="/mnt/cloud-storage/Important Shit/Git/Development/Varaverk"
PROD_ROOT="/mnt/user/appdata/Varaverk"
UPGRADE="$PROD_ROOT/Deployment/conf_upgrade.sh"
LOG="/tmp/vv_deploy.log"
+122 -2
View File
@@ -115,6 +115,14 @@
# detect_hosts() resolves MY_ID / REMOTE_ID from master.conf at startup.
# Exits if the host cannot be identified — prevents running on an unknown machine.
#
# Partnership Gate
# When FALLBACK_PARTNERSHIP_REQUIRED=true, fallback is only permitted when the
# local partnership DB reports an active partnership. If partnership goes inactive,
# a grace timer starts. After FALLBACK_PARTNERSHIP_SUSPEND_AFTER minutes the loop
# suspends: no new FALLBACK is entered, and any live fallback containers are
# stopped cleanly. Resumes automatically when partnership becomes active again.
# Set FALLBACK_PARTNERSHIP_REQUIRED=false to run fallback without a partnership.
#
# Silent by Default
# State transitions: warn() — always visible. Healthy routine cycles: log()
# — suppressed unless --log. Produces no output on clean cycles.
@@ -125,8 +133,9 @@
#
# FALLBACK_STATE_FILE — /boot/config/fallback_state.db (survives reboots)
# Keys: state, fallback_start, handback_strikes, tier2_started,
# tier3_started, tier4_started. Lives on /boot/ intentionally — if the
# server was in FALLBACK when it rebooted, it resumes FALLBACK on restart.
# tier3_started, tier4_started, partnership_suspended, partner_lost_at.
# Lives on /boot/ intentionally — if the server was in FALLBACK when it
# rebooted, it resumes FALLBACK on restart.
#
# ==============================================================================================
# CONFIGURATION
@@ -164,6 +173,16 @@
# FALLBACK_ENABLED
# false = exit cleanly (e.g. remote server being rebuilt). (default: false)
#
# FALLBACK_PARTNERSHIP_REQUIRED
# true = fallback is gated on an active partnership — suspends when no active
# partner is found after FALLBACK_PARTNERSHIP_SUSPEND_AFTER minutes.
# false = fallback runs standalone regardless of partnership state. (default: true)
#
# FALLBACK_PARTNERSHIP_SUSPEND_AFTER
# Minutes without an active partnership before fallback suspends itself.
# Grace period: fallback continues normally during this window.
# 0 = suspend immediately when partnership goes inactive. (default: 120)
#
# FALLBACK_CHECK_INTERVAL
# Seconds between connectivity checks. (default: 30)
#
@@ -315,6 +334,36 @@ state_init() {
[[ -z "$(state_get tier2_started)" ]] && state_set tier2_started "false"
[[ -z "$(state_get tier3_started)" ]] && state_set tier3_started "false"
[[ -z "$(state_get tier4_started)" ]] && state_set tier4_started "false"
[[ -z "$(state_get partnership_suspended)" ]] && state_set partnership_suspended "false"
[[ -z "$(state_get partner_lost_at)" ]] && state_set partner_lost_at "0"
}
# ==============================================================================================
# ── PARTNERSHIP GATE HELPERS ──────────────────────────────────────────────────────────────────
# ==============================================================================================
# Returns 0 (true) if the local partnership DB reports an ACTIVE partnership.
# Reads /boot/config/partnership_<hostname>.db — no subprocess, no SSH.
check_partnership_active() {
local state_file="/boot/config/partnership_${LOCAL_SERVER_NAME}.db"
local state
state=$(grep "^state=" "$state_file" 2>/dev/null | cut -d= -f2)
[[ "$state" == "ACTIVE" ]]
}
# Stop all tiers that were started during a fallback and clear their state flags.
# Called when the partnership gate suspends an in-progress fallback.
_abort_fallback_containers() {
for tier in 4 3 2 1; do
[[ "$(state_get "tier${tier}_started")" != "true" ]] && continue
warn "Aborting Tier $tier containers — partnership suspended"
local containers
read -r -a containers <<< "$(get_tier_containers "$tier")"
for container in "${containers[@]}"; do
[[ -n "$container" ]] && local_stop "$container"
done
state_set "tier${tier}_started" "false"
done
}
# ==============================================================================================
@@ -577,6 +626,22 @@ if [[ "$SHOW_STATUS" == true ]]; then
echo "$ICON_GEAR Enabled: $FALLBACK_ENABLED"
echo "$ICON_GEAR Dry Run: $DRY_RUN"
if [[ "${FALLBACK_PARTNERSHIP_REQUIRED:-true}" == "true" ]]; then
SUSPENDED=$(state_get partnership_suspended)
PLOST=$(state_get partner_lost_at)
if [[ "$SUSPENDED" == "true" ]]; then
echo "$ICON_GEAR Partnership: SUSPENDED (no active partnership)"
elif [[ -n "$PLOST" && "$PLOST" != "0" ]]; then
PLOST_MIN=$(( ($(date +%s) - PLOST) / 60 ))
echo "$ICON_GEAR Partnership: GRACE (${PLOST_MIN}min / ${FALLBACK_PARTNERSHIP_SUSPEND_AFTER:-120}min until suspend)"
else
echo "$ICON_GEAR Partnership: ACTIVE"
fi
else
echo "$ICON_GEAR Partnership: REQUIRED=false (standalone mode)"
fi
echo "━━━━━━━━━━━━━━━━━━━━━━━"
exit 0
fi
@@ -796,6 +861,61 @@ while [[ "$FALLBACK_RUNNING" == true ]]; do
log "Remote: $REMOTE_UP | Internet: $INTERNET_UP | State: $CURRENT_STATE"
# ── Partnership gate ──────────────────────────────────────────────────────────────────────
# When FALLBACK_PARTNERSHIP_REQUIRED=true, a fallback without an active partner is
# meaningless — who are we covering for? The gate suspends the loop after a grace
# period and aborts any live fallback containers. Clears automatically when partnership
# is restored.
if [[ "${FALLBACK_PARTNERSHIP_REQUIRED:-true}" == "true" ]]; then
if check_partnership_active; then
# Partnership healthy — clear any accumulated grace state
if [[ "$(state_get partnership_suspended)" == "true" ]]; then
warn "Active partnership restored — re-enabling fallback monitoring"
state_set partnership_suspended "false"
state_set partner_lost_at "0"
notify "Fallback re-enabled on $(hostname) — active partnership restored" \
"Fallback" "normal"
elif [[ "$(state_get partner_lost_at)" != "0" ]]; then
log "Partnership recovered within grace window — resetting timer"
state_set partner_lost_at "0"
fi
else
PARTNER_LOST_AT=$(state_get partner_lost_at)
if [[ -z "$PARTNER_LOST_AT" || "$PARTNER_LOST_AT" == "0" ]]; then
warn "No active partnership detected — grace timer started (${FALLBACK_PARTNERSHIP_SUSPEND_AFTER:-120}min before suspend)"
state_set partner_lost_at "$NOW"
PARTNER_LOST_AT=$NOW
fi
PARTNER_LOST_MIN=$(( (NOW - PARTNER_LOST_AT) / 60 ))
SUSPEND_AFTER=${FALLBACK_PARTNERSHIP_SUSPEND_AFTER:-120}
if [[ "$(state_get partnership_suspended)" == "true" || "$PARTNER_LOST_MIN" -ge "$SUSPEND_AFTER" ]]; then
# Suspend — abort any live fallback containers, then skip this cycle entirely
if [[ "$(state_get partnership_suspended)" != "true" ]]; then
warn "No active partnership for ${PARTNER_LOST_MIN}min — suspending fallback"
state_set partnership_suspended "true"
notify "Fallback suspended on $(hostname) — no active partnership for ${PARTNER_LOST_MIN}min" \
"Fallback" "warning"
fi
if [[ "$CURRENT_STATE" == "FALLBACK" ]]; then
warn "Aborting in-progress fallback — partnership suspended"
_abort_fallback_containers
state_set state "NORMAL"
state_set fallback_start "0"
state_set handback_strikes "0"
notify "Fallback aborted on $(hostname) — no active partnership, containers stopped" \
"Fallback" "warning"
fi
log "Partnership suspended — skipping fallback cycle"
sleep "$FALLBACK_CHECK_INTERVAL" & wait $!
continue
else
log "No active partnership — ${PARTNER_LOST_MIN}min elapsed / ${SUSPEND_AFTER}min until suspend"
fi
fi
fi
# ════════════════════════════════════════════════════════════════
# NORMAL STATE
# ════════════════════════════════════════════════════════════════
+29 -29
View File
@@ -89,8 +89,8 @@ hostname
### ── Clone on HOST1 ───────────────────────────────────────────────────────────
```bash
git clone <your_repo_url> /mnt/user/appdata/varaverk
cd /mnt/user/appdata/varaverk
git clone <your_repo_url> /mnt/user/appdata/Varaverk
cd /mnt/user/appdata/Varaverk
```
---
@@ -98,8 +98,8 @@ cd /mnt/user/appdata/varaverk
### ── Clone on HOST2 ───────────────────────────────────────────────────────────
```bash
git clone <your_repo_url> /mnt/user/appdata/varaverk
cd /mnt/user/appdata/varaverk
git clone <your_repo_url> /mnt/user/appdata/Varaverk
cd /mnt/user/appdata/Varaverk
```
---
@@ -112,7 +112,7 @@ credentials. Set up sparse checkout so each server only receives its own conf fi
**On HOST1** — exclude host2.conf:
```bash
cd /mnt/user/appdata/varaverk
cd /mnt/user/appdata/Varaverk
git sparse-checkout init --no-cone
git sparse-checkout set '/*' '!/Configurations/host2.conf'
git checkout
@@ -120,7 +120,7 @@ git checkout
**On HOST2** — exclude host1.conf:
```bash
cd /mnt/user/appdata/varaverk
cd /mnt/user/appdata/Varaverk
git sparse-checkout init --no-cone
git sparse-checkout set '/*' '!/Configurations/host1.conf'
git checkout
@@ -235,7 +235,7 @@ prompted for HOST1's root password once (for the initial key copy). After that,
all SSH is keyless.
```bash
cd /mnt/user/appdata/varaverk
cd /mnt/user/appdata/Varaverk
bash Partnership/ssh_setup.sh
```
@@ -249,7 +249,7 @@ When prompted, enter HOST1's root password. The script:
### ── Run on HOST1 ──────────────────────────────────────────────────────────
```bash
cd /mnt/user/appdata/varaverk
cd /mnt/user/appdata/Varaverk
bash Partnership/ssh_setup.sh
```
@@ -312,15 +312,15 @@ paste the command. Name the entry to match the script name.
| Script | Cron schedule | Command |
|--------|--------------|---------|
| `array_started` | At Array Start | `bash /mnt/user/appdata/varaverk/Orchestrators/array_started.sh` |
| `watchdog_orchestrator` | `* * * * *` | `bash /mnt/user/appdata/varaverk/Orchestrators/watchdog_orchestrator.sh` |
| `transcode_management` | `*/7 * * * *` | `bash /mnt/user/appdata/varaverk/Orchestrators/transcode_management.sh` |
| `critical_sync_maintenance` | `*/30 * * * *` | `bash /mnt/user/appdata/varaverk/Orchestrators/critical_sync_maintenance.sh` |
| `emby_fallback_sync` | `*/30 * * * *` | `bash /mnt/user/appdata/varaverk/Rsync/rsync.sh /mnt/user/Media_Server/Emby --profile=emby-fallback` |
| `intermediate_sync_maintenance` | `0 */4 * * *` | `bash /mnt/user/appdata/varaverk/Orchestrators/intermediate_sync_maintenance.sh` |
| `daily_sync_maintenance` | `0 1 * * *` | `bash /mnt/user/appdata/varaverk/Orchestrators/daily_sync_maintenance.sh` |
| `weekly_sync_maintenance` | `30 2 * * 0` | `bash /mnt/user/appdata/varaverk/Orchestrators/weekly_sync_maintenance.sh` |
| `weekly_health_digest` | `0 8 * * *` | `bash /mnt/user/appdata/varaverk/Monitors/weekly_health_digest.sh` |
| `array_started` | At Array Start | `bash /mnt/user/appdata/Varaverk/Orchestrators/array_started.sh` |
| `watchdog_orchestrator` | `* * * * *` | `bash /mnt/user/appdata/Varaverk/Orchestrators/watchdog_orchestrator.sh` |
| `transcode_management` | `*/7 * * * *` | `bash /mnt/user/appdata/Varaverk/Orchestrators/transcode_management.sh` |
| `critical_sync_maintenance` | `*/30 * * * *` | `bash /mnt/user/appdata/Varaverk/Orchestrators/critical_sync_maintenance.sh` |
| `emby_fallback_sync` | `*/30 * * * *` | `bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh /mnt/user/Media_Server/Emby --profile=emby-fallback` |
| `intermediate_sync_maintenance` | `0 */4 * * *` | `bash /mnt/user/appdata/Varaverk/Orchestrators/intermediate_sync_maintenance.sh` |
| `daily_sync_maintenance` | `0 1 * * *` | `bash /mnt/user/appdata/Varaverk/Orchestrators/daily_sync_maintenance.sh` |
| `weekly_sync_maintenance` | `30 2 * * 0` | `bash /mnt/user/appdata/Varaverk/Orchestrators/weekly_sync_maintenance.sh` |
| `weekly_health_digest` | `0 8 * * *` | `bash /mnt/user/appdata/Varaverk/Monitors/weekly_health_digest.sh` |
> `array_started` uses the built-in "At Array Start" schedule option in User Scripts —
> it is not a cron expression.
@@ -354,7 +354,7 @@ will take a while depending on library size.
```bash
# On HOST1 — preview what would sync, check paths and profiles
bash /mnt/user/appdata/varaverk/Orchestrators/daily_sync_maintenance.sh --dry-run --log
bash /mnt/user/appdata/Varaverk/Orchestrators/daily_sync_maintenance.sh --dry-run --log
```
Review the output. Check that:
@@ -368,7 +368,7 @@ Review the output. Check that:
```bash
# On HOST1 — run the full daily sync (this includes rsync for all DAILY_SYNC_SHARES)
bash /mnt/user/appdata/varaverk/Orchestrators/daily_sync_maintenance.sh --log
bash /mnt/user/appdata/Varaverk/Orchestrators/daily_sync_maintenance.sh --log
```
This will take longer than future nightly runs — it is transferring everything for
@@ -381,7 +381,7 @@ watch -n5 'ls -lh /mnt/user/Movies/ | tail -5'
After it finishes, also run the critical sync to populate auth and Emby state:
```bash
bash /mnt/user/appdata/varaverk/Orchestrators/critical_sync_maintenance.sh --log
bash /mnt/user/appdata/Varaverk/Orchestrators/critical_sync_maintenance.sh --log
```
---
@@ -410,7 +410,7 @@ Commit and pull on both servers so both pick up the change.
To start it now without a reboot:
```bash
bash /mnt/user/appdata/varaverk/Fallback/fallback.sh &
bash /mnt/user/appdata/Varaverk/Fallback/fallback.sh &
```
---
@@ -437,10 +437,10 @@ simulates an outage using `iptables` — no real downtime, no real data changes.
```bash
# On HOST2 — dry run first (sees the sequence, no container starts)
bash /mnt/user/appdata/varaverk/Fallback/fallback_test.sh --dry-run --log
bash /mnt/user/appdata/Varaverk/Fallback/fallback_test.sh --dry-run --log
# When ready — real test (uses iptables to simulate HOST1 unreachable)
bash /mnt/user/appdata/varaverk/Fallback/fallback_test.sh --log
bash /mnt/user/appdata/Varaverk/Fallback/fallback_test.sh --log
```
The test runs in phases — blocks HOST1's Tailscale IP, waits for `fallback.sh` to
@@ -478,9 +478,9 @@ HOST2 runs first — it generates its SSH key and waits. The owner completes set
```bash
# On HOST2
bash /mnt/user/appdata/varaverk/Partnership/partnership_onboard.sh --dry-run --log
bash /mnt/user/appdata/Varaverk/Partnership/partnership_onboard.sh --dry-run --log
# Review output, then:
bash /mnt/user/appdata/varaverk/Partnership/partnership_onboard.sh --log
bash /mnt/user/appdata/Varaverk/Partnership/partnership_onboard.sh --log
```
HOST2's work is done after Step 1 (SSH key setup). The rest happens on HOST1.
@@ -491,9 +491,9 @@ HOST2's work is done after Step 1 (SSH key setup). The rest happens on HOST1.
```bash
# On HOST1
bash /mnt/user/appdata/varaverk/Partnership/partnership_onboard.sh --dry-run --log
bash /mnt/user/appdata/Varaverk/Partnership/partnership_onboard.sh --dry-run --log
# Review output — this will deploy auth + arr stacks to HOST2 remotely
bash /mnt/user/appdata/varaverk/Partnership/partnership_onboard.sh --log
bash /mnt/user/appdata/Varaverk/Partnership/partnership_onboard.sh --log
```
The owner path deploys containers to HOST2 via SSH, configures WebUI targets, runs
@@ -542,8 +542,8 @@ cat /boot/config/fallback_state.db
Bandwidth monitor records every sync:
```bash
# Latest transfer log
ls -lt /mnt/user/appdata/varaverk/data/bandwidth_monitor/
cat /mnt/user/appdata/varaverk/data/bandwidth_monitor/<latest_log>
ls -lt /mnt/user/appdata/Varaverk/data/bandwidth_monitor/
cat /mnt/user/appdata/Varaverk/data/bandwidth_monitor/<latest_log>
```
---
+10 -1
View File
@@ -42,10 +42,12 @@
#
# master.conf
#
# PLAY_SYNC_ENABLED Master toggle (default: true)
# PLAY_SYNC_REMOTE Sync across all hosts via Tailscale (default: true)
# false = local servers only (this host's Emby + Jellyfin)
# PLAY_SYNC_DAYS How many days back to check for played items (default: 90)
# Use 0 to sync all played items (slow on large libraries).
# PLAY_SYNC_TYPES Comma-separated item types to sync (default: Movie,Episode,Audio)
# PLAY_SYNC_ENABLED Master toggle (default: true)
#
# ==============================================================================================
# RUNTIME MODES
@@ -118,6 +120,12 @@ for _varname in $(compgen -v | grep -E '^HOST[0-9]+$' | sort); do
_is_me=false
[[ "${_host_hostname,,}" == "${_my_hostname,,}" ]] && _is_me=true
# Skip remote hosts when PLAY_SYNC_REMOTE=false
if [[ "$_is_me" == false && "${PLAY_SYNC_REMOTE:-true}" != "true" ]]; then
log "$_host_hostname — remote sync disabled (PLAY_SYNC_REMOTE=false), skipping"
continue
fi
# Resolve Tailscale IP for remote hosts
_ts_ip=""
if [[ "$_is_me" == false ]]; then
@@ -197,6 +205,7 @@ _ticks_to_sec() {
if [[ "$SHOW_STATUS" == true ]]; then
echo ""
echo "━━━━━ $ICON_SUMMARY PLAY STATE SYNC STATUS ━━━━━"
echo "$ICON_GEAR Remote sync: ${PLAY_SYNC_REMOTE:-true}"
echo "$ICON_GEAR Sync days: ${SYNC_DAYS:-all}"
echo "$ICON_GEAR Item types: $SYNC_TYPES"
echo ""
+1 -1
View File
@@ -295,7 +295,7 @@ if [[ "$DRY_RUN" == false ]]; then
-o ConnectTimeout="$SSH_TIMEOUT" \
-o StrictHostKeyChecking=no \
"$SCRIPTS_ROOT/master.conf" \
"root@${MIRROR_IP}:/mnt/user/appdata/varaverk/master.conf" 2>/dev/null && \
"root@${MIRROR_IP}:/mnt/user/appdata/Varaverk/master.conf" 2>/dev/null && \
log "master.conf pushed to $NEW_OWNER" || \
error "Failed to push master.conf to $NEW_OWNER — set PARTNERSHIP_OWNER_HOST=\"$NEW_OWNER_ID\" manually"
else
+54 -10
View File
@@ -1,16 +1,60 @@
#!/bin/bash
# dev_install.sh — symlinks the OS-appropriate plugin into the web server for local development.
# Run once after cloning. Re-run if the repo is moved.
# Safe to re-run: removes stale symlink before recreating.
# ==============================================================================================
# ============================= dev_install.sh =================================================
# ==============================================================================================
#
# Plugin layout:
# Plugin/unraid/ ← Unraid plugin (PHP, served by emhttp at /usr/local/emhttp/plugins/)
# Plugin/debian/ ← future
# Plugin/<os>/ ← future
# PURPOSE
# ─────────────────────────────────────────────────────────────────────────────
# Symlinks the OS-appropriate plugin directory into the web server on first
# install or after the repo is moved. Run once by hand — never by a scheduler.
#
# Adding a new OS:
# 1. Create Plugin/<os>/ with the OS-appropriate web app files
# 2. Add detection + TARGET path below
# Detects the running OS from /etc/*-version markers, picks the matching
# Plugin/<os>/ source directory, and creates a symlink at the web server's
# plugin location. All subsequent file changes under Plugin/<os>/ take effect
# immediately without re-running this script.
#
# ==============================================================================================
# OPERATIONAL SAFEGUARDS
# ==============================================================================================
#
# Idempotent Symlink
# Removes any existing symlink at the target before recreating it. Safe to
# re-run after a repo move without leaving stale paths.
#
# Real Directory Guard
# If the target exists as a real directory (not a symlink), the script refuses
# to proceed. Manual cleanup is required to avoid silently discarding an
# existing installation.
#
# Missing Source Guard
# Exits early if Plugin/<os>/ does not exist — catches a missing OS directory
# before any filesystem changes are made.
#
# ==============================================================================================
# CONFIGURATION
# ==============================================================================================
#
# No config vars. All paths are derived from $BASH_SOURCE and the detected OS.
#
# PLUGIN_NAME varaverk (hardcoded — must match the plugin's registered name)
#
# OS detection markers:
# /etc/unraid-version → unraid → /usr/local/emhttp/plugins/varaverk
# /etc/debian_version → debian → (target path not yet defined)
# /etc/arch-release → arch → (target path not yet defined)
#
# ==============================================================================================
# RUNTIME MODES
# ==============================================================================================
#
# ./dev_install.sh
# Auto-detects the running OS and installs.
#
# ./dev_install.sh <os>
# Overrides OS detection. Valid values: unraid, debian, arch.
# Useful when testing on a machine where the marker files differ.
#
# ==============================================================================================
set -euo pipefail
+6
View File
@@ -4,6 +4,9 @@ require_once dirname(__DIR__) . '/include/monitor.php';
require_once dirname(__DIR__) . '/include/vms.php';
require_once dirname(__DIR__) . '/include/docker_folders.php';
// Pre-warm the API cache with one request (shared by all API-first functions below).
vv_api_data();
echo json_encode([
'system' => vv_system_info(),
'fallback' => vv_fallback_state(),
@@ -22,9 +25,12 @@ echo json_encode([
'parity' => vv_parity_status(),
'storage' => vv_storage_pools(),
'array_disks' => vv_array_disks(),
'watchdog' => vv_watchdog_summary(),
'scripts' => vv_scripts_status(),
'thresholds' => vv_disk_thresholds(),
'vms' => vv_get_vms(),
'docker_folders' => vv_get_docker_folders(),
'remote_hosts' => vv_remote_hosts_stats(),
'_api_status' => vv_api_get_status(),
'ts' => time(),
]);
+3
View File
@@ -16,5 +16,8 @@ $cmd = match($action) {
'restart' => '/sbin/shutdown -r now',
};
$logLine = date('Y-m-d H:i:s') . " action={$action} ip=" . ($_SERVER['REMOTE_ADDR'] ?? 'unknown') . "\n";
@file_put_contents('/boot/config/plugins/varaverk/actions.log', $logLine, FILE_APPEND | LOCK_EX);
exec($cmd . ' > /dev/null 2>&1 &');
echo json_encode(['ok' => true]);
@@ -6,4 +6,4 @@ php -r "
require_once '/usr/local/emhttp/plugins/varaverk/include/scheduler.php';
\$schedule = vv_schedule_load();
if (\$schedule) vv_cron_rebuild(\$schedule);
" 2>/dev/null
" 2>>/var/log/varaverk/rebuild_cron.log
Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

After

Width:  |  Height:  |  Size: 1.4 MiB

+1 -1
View File
@@ -5,7 +5,7 @@
define('PLUGIN_CFG', '/boot/config/plugins/varaverk/varaverk.cfg');
$_vv_cfg = @parse_ini_file(PLUGIN_CFG) ?: [];
define('SCRIPTS_DIR', $_vv_cfg['SCRIPTS_DIR'] ?? '/mnt/user/appdata/varaverk');
define('SCRIPTS_DIR', $_vv_cfg['SCRIPTS_DIR'] ?? '/mnt/user/appdata/Varaverk');
define('CONF_DIR', SCRIPTS_DIR . '/Configurations');
define('LOG_DIR', '/var/log/varaverk');
unset($_vv_cfg);
+1 -1
View File
@@ -131,7 +131,7 @@ function vv_watchdog_summary(): array {
}
// Recent restarts (24 h)
$restartLog = '/mnt/user/appdata/varaverk/data/container_restart_history.db';
$restartLog = '/mnt/user/appdata/Varaverk/data/container_restart_history.db';
$restartRaw = @file_get_contents($restartLog) ?: '';
$cutoff = time() - 86400;
$restarts = [];
+26 -1
View File
@@ -1,5 +1,31 @@
<?php
require_once __DIR__ . '/unraid_api.php';
function vv_get_vms(): array {
// ── API path ──────────────────────────────────────────────────────────────
$api = vv_api_data();
if ($api && isset($api['vms']['domains'])) {
$vms = [];
foreach ($api['vms']['domains'] as $d) {
$name = $d['name'] ?? '';
// VmState enum values are RUNNING, PAUSED, SHUT_OFF, etc. — normalise to lowercase
$state = strtolower(str_replace('_', ' ', $d['state'] ?? 'unknown'));
$nl = strtolower($name);
$os = 'linux';
if (str_contains($nl, 'win')) $os = 'windows';
elseif (str_contains($nl, 'mac') || str_contains($nl, 'osx')) $os = 'macos';
elseif (str_contains($nl, 'bsd') || str_contains($nl, 'freebsd')) $os = 'bsd';
// vcpus/mem_mb not available via API — will show null (virsh fallback provides them)
$vms[] = ['name' => $name, 'state' => $state, 'os' => $os, 'vcpus' => null, 'mem_mb' => null];
}
return ['available' => true, 'vms' => $vms];
}
// ── Local fallback ────────────────────────────────────────────────────────
vv_api_record_fallback('vms');
if (!file_exists('/usr/bin/virsh')) return ['available' => false, 'vms' => []];
exec('virsh list --all --name 2>/dev/null', $names, $rc);
@@ -20,7 +46,6 @@ function vv_get_vms(): array {
if (preg_match('/Used memory\s*:\s*(\d+)/i', $info, $m)) $memMb = (int)round((int)$m[1] / 1024);
}
// OS detection from libvirt XML
$os = 'linux';
$xmlPath = '/etc/libvirt/qemu/' . $name . '.xml';
if (file_exists($xmlPath)) {
+1 -1
View File
@@ -313,7 +313,7 @@ function vv_wd_all(): array {
$currentHost = vv_detect_host();
$tsPeers = vv_pt_ts_peers();
$masterRaw = vv_read_conf_raw('master.conf');
$restartLog = '/mnt/user/appdata/varaverk/data/container_restart_history.db';
$restartLog = '/mnt/user/appdata/Varaverk/data/container_restart_history.db';
// Config thresholds from master.conf
$cfg = [
+50 -50
View File
@@ -95,7 +95,7 @@ Background: YES — required (starts continuous background processes)
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Orchestrators/array_started.sh
/mnt/user/appdata/Varaverk/Orchestrators/array_started.sh
```
**What it does:**
@@ -133,7 +133,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Orchestrators/transcode_management.sh
/mnt/user/appdata/Varaverk/Orchestrators/transcode_management.sh
```
**What it does:**
@@ -173,7 +173,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Orchestrators/critical_sync_maintenance.sh
/mnt/user/appdata/Varaverk/Orchestrators/critical_sync_maintenance.sh
```
**What it does:**
@@ -206,7 +206,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Orchestrators/arrs_failed_stalled_recovery.sh
/mnt/user/appdata/Varaverk/Orchestrators/arrs_failed_stalled_recovery.sh
```
**What it does:**
@@ -241,7 +241,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Orchestrators/daily_sync_maintenance.sh
/mnt/user/appdata/Varaverk/Orchestrators/daily_sync_maintenance.sh
```
**What it does:**
@@ -308,7 +308,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Orchestrators/weekly_sync_maintenance.sh
/mnt/user/appdata/Varaverk/Orchestrators/weekly_sync_maintenance.sh
```
**What it does:**
@@ -355,7 +355,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Orchestrators/sunday_morning_coffee_report.sh
/mnt/user/appdata/Varaverk/Orchestrators/sunday_morning_coffee_report.sh
```
**What it does:**
@@ -402,7 +402,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Monitors/weekly_health_digest.sh
/mnt/user/appdata/Varaverk/Monitors/weekly_health_digest.sh
```
**What it does:**
@@ -434,7 +434,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Monitors/system_tuning_monitor.sh
/mnt/user/appdata/Varaverk/Monitors/system_tuning_monitor.sh
```
**What it does:**
@@ -466,7 +466,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Monitors/zfs_memory_snapshot.sh
/mnt/user/appdata/Varaverk/Monitors/zfs_memory_snapshot.sh
```
**What it does:**
@@ -492,7 +492,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Monitors/smart_health.sh
/mnt/user/appdata/Varaverk/Monitors/smart_health.sh
```
**What it does:**
@@ -523,7 +523,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Monitors/cert_monitor.sh
/mnt/user/appdata/Varaverk/Monitors/cert_monitor.sh
```
**What it does:**
@@ -556,7 +556,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Monitors/backup_verify.sh
/mnt/user/appdata/Varaverk/Monitors/backup_verify.sh
```
**What it does:**
@@ -590,7 +590,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Monitors/emby_session_report.sh
/mnt/user/appdata/Varaverk/Monitors/emby_session_report.sh
```
**What it does:**
@@ -616,7 +616,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Monitors/bandwidth_monitor.sh --report
/mnt/user/appdata/Varaverk/Monitors/bandwidth_monitor.sh --report
```
**What it does:**
@@ -654,7 +654,7 @@ Background: NO (runs and exits — status check)
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Fallback/fallback.sh --status
/mnt/user/appdata/Varaverk/Fallback/fallback.sh --status
```
**What it does:**
@@ -679,7 +679,7 @@ Background: YES — test takes several minutes
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Fallback/fallback_test.sh --dry-run
/mnt/user/appdata/Varaverk/Fallback/fallback_test.sh --dry-run
```
**What it does:**
@@ -752,7 +752,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Rsync/rsync.sh \
/mnt/user/appdata/Varaverk/Rsync/rsync.sh \
/mnt/user/appdata-Fallback/Critical-Data
```
@@ -773,7 +773,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Rsync/rsync.sh \
/mnt/user/appdata/Varaverk/Rsync/rsync.sh \
/mnt/user/Media_Server/Emby --profile=emby
```
@@ -794,7 +794,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Rsync/rsync.sh \
/mnt/user/appdata/Varaverk/Rsync/rsync.sh \
/mnt/user/appdata-Fallback/Arrs_Stack
```
@@ -815,7 +815,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Rsync/rsync.sh \
/mnt/user/appdata/Varaverk/Rsync/rsync.sh \
/mnt/user/appdata-Fallback/Important-Data
```
@@ -835,7 +835,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Rsync/rsync.sh \
/mnt/user/appdata/Varaverk/Rsync/rsync.sh \
/mnt/user/appdata-Fallback/Gmer4Lfe
```
@@ -867,7 +867,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Watchdogs/docker_watchdog.sh --status
/mnt/user/appdata/Varaverk/Watchdogs/docker_watchdog.sh --status
```
**What it shows:**
@@ -888,7 +888,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Docker_Essentials/watchdog_skip_list_manager.sh --status
/mnt/user/appdata/Varaverk/Docker_Essentials/watchdog_skip_list_manager.sh --status
```
**What it does:**
@@ -927,7 +927,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Docker_Essentials/docker_daily_restart.sh --dry-run
/mnt/user/appdata/Varaverk/Docker_Essentials/docker_daily_restart.sh --dry-run
```
**What it does:**
@@ -954,7 +954,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Docker_Essentials/docker_network_connect.sh --status
/mnt/user/appdata/Varaverk/Docker_Essentials/docker_network_connect.sh --status
```
**What it does:**
@@ -988,7 +988,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Media/media_shares_permissions.sh --dry-run
/mnt/user/appdata/Varaverk/Media/media_shares_permissions.sh --dry-run
```
**What it does:**
@@ -1014,7 +1014,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Media/media_cleaner.sh anime --dry-run
/mnt/user/appdata/Varaverk/Media/media_cleaner.sh anime --dry-run
```
**What it does:**
@@ -1035,7 +1035,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Media/media_cleaner.sh media --dry-run
/mnt/user/appdata/Varaverk/Media/media_cleaner.sh media --dry-run
```
**What it does:**
@@ -1055,7 +1055,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Media/lidarr_cleanup.sh --dry-run --log
/mnt/user/appdata/Varaverk/Media/lidarr_cleanup.sh --dry-run --log
```
**What it does:**
@@ -1087,7 +1087,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Media/sonarr_cleanup.sh --dry-run --log
/mnt/user/appdata/Varaverk/Media/sonarr_cleanup.sh --dry-run --log
```
**What it does:**
@@ -1108,7 +1108,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Media/radarr_cleanup.sh --dry-run --log
/mnt/user/appdata/Varaverk/Media/radarr_cleanup.sh --dry-run --log
```
**What it does:**
@@ -1139,7 +1139,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Transcodes/ramdisk_setup.sh --status
/mnt/user/appdata/Varaverk/Transcodes/ramdisk_setup.sh --status
```
**What it shows:**
@@ -1160,7 +1160,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Transcodes/transcode_manager.sh --status
/mnt/user/appdata/Varaverk/Transcodes/transcode_manager.sh --status
```
**What it shows:**
@@ -1191,7 +1191,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Watchdogs/System/webgui_watchdog.sh
/mnt/user/appdata/Varaverk/Watchdogs/System/webgui_watchdog.sh
```
**What it does:**
@@ -1222,7 +1222,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/unRAID_Essentials/clear_logs.sh
/mnt/user/appdata/Varaverk/unRAID_Essentials/clear_logs.sh
```
**What it does:**
@@ -1249,7 +1249,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Watchdogs/stability_watchdog.sh --status
/mnt/user/appdata/Varaverk/Watchdogs/stability_watchdog.sh --status
```
**What it shows:**
@@ -1270,7 +1270,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/unRAID_Essentials/mover_stop.sh
/mnt/user/appdata/Varaverk/unRAID_Essentials/mover_stop.sh
```
**What it does:**
@@ -1291,7 +1291,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/unRAID_Essentials/rsync_stop.sh --status
/mnt/user/appdata/Varaverk/unRAID_Essentials/rsync_stop.sh --status
```
**What it does:**
@@ -1313,7 +1313,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/unRAID_Essentials/user_scripts_stop.sh --status
/mnt/user/appdata/Varaverk/unRAID_Essentials/user_scripts_stop.sh --status
```
**What it does:**
@@ -1335,7 +1335,7 @@ Background: YES — sequence takes 1-2 minutes
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/unRAID_Essentials/server_reboot.sh --dry-run
/mnt/user/appdata/Varaverk/unRAID_Essentials/server_reboot.sh --dry-run
```
**What it does:**
@@ -1372,7 +1372,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Partnership/partnership_manage.sh --status
/mnt/user/appdata/Varaverk/Partnership/partnership_manage.sh --status
```
**What it shows:**
@@ -1393,7 +1393,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Partnership/partnership_manage.sh --onboard --dry-run
/mnt/user/appdata/Varaverk/Partnership/partnership_manage.sh --onboard --dry-run
```
**What it does:**
@@ -1417,7 +1417,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Partnership/partnership_manage.sh --offboard --dry-run
/mnt/user/appdata/Varaverk/Partnership/partnership_manage.sh --offboard --dry-run
```
**What it does:**
@@ -1451,7 +1451,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Tools/bulk_permissions_repair.sh /mnt/user/Movies --dry-run
/mnt/user/appdata/Varaverk/Tools/bulk_permissions_repair.sh /mnt/user/Movies --dry-run
```
**What it does:**
@@ -1473,7 +1473,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Tools/container_data_export.sh \
/mnt/user/appdata/Varaverk/Tools/container_data_export.sh \
Emby /mnt/media-servers/Media_Server/Emby /mnt/user/Backups/
```
@@ -1498,7 +1498,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Tools/emby_database_repair.sh
/mnt/user/appdata/Varaverk/Tools/emby_database_repair.sh
```
**What it does:**
@@ -1530,7 +1530,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Tools/zfs_pool_scrub.sh
/mnt/user/appdata/Varaverk/Tools/zfs_pool_scrub.sh
```
**What it does:**
@@ -1552,7 +1552,7 @@ Background: YES
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/Tools/recreate_shares.sh --dry-run
/mnt/user/appdata/Varaverk/Tools/recreate_shares.sh --dry-run
```
**What it does:**
@@ -1580,7 +1580,7 @@ Background: NO
```bash
#!/bin/bash
/mnt/user/appdata/varaverk/unRAID_Essentials/git_pull_execute.sh
/mnt/user/appdata/Varaverk/unRAID_Essentials/git_pull_execute.sh
```
**What it does:**
+1 -1
View File
@@ -858,5 +858,5 @@ Things that are different from what you might expect:
```
Name: Varaverk
Repository: git@192.168.50.2:Varaverk/varaverk.git
Install path: /mnt/user/appdata/varaverk
Install path: /mnt/user/appdata/Varaverk
```
+23 -23
View File
@@ -134,10 +134,10 @@ and updates `host*.conf` with the key path automatically.
```bash
# On HOST1 — after the repo is cloned:
bash /mnt/user/appdata/varaverk/Partnership/ssh_setup.sh
bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh
# On HOST2:
bash /mnt/user/appdata/varaverk/Partnership/ssh_setup.sh
bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh
```
Key naming convention: hostname lowercased, `unraid-` prefix stripped.
@@ -150,7 +150,7 @@ unRAID-Jayred365 → /root/.ssh/jayred365_rsync_automation
generated key. Run `--status` to verify:
```bash
bash /mnt/user/appdata/varaverk/Partnership/ssh_setup.sh --status
bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh --status
```
> **`ssh_setup.sh` is idempotent** — safe to re-run. Use `--force` to regenerate
@@ -174,15 +174,15 @@ cat /root/.ssh/unraid_gitea.pub
```bash
# Create target directory:
mkdir -p /mnt/user/appdata/varaverk
mkdir -p /mnt/user/appdata/Varaverk
# Clone:
GIT_SSH_COMMAND="ssh -i /root/.ssh/unraid_gitea" \
git clone git@YOUR_GITEA_HOST:Varaverk/varaverk.git \
/mnt/user/appdata/varaverk
/mnt/user/appdata/Varaverk
# Make scripts executable:
find /mnt/user/appdata/varaverk -name "*.sh" -exec chmod +x {} \;
find /mnt/user/appdata/Varaverk -name "*.sh" -exec chmod +x {} \;
```
Expected structure after clone:
@@ -204,7 +204,7 @@ Docker_Essentials/
## ━━━ STEP 5 — CONFIGURE MASTER.CONF ━━━
```bash
nano /mnt/user/appdata/varaverk/master.conf
nano /mnt/user/appdata/Varaverk/master.conf
```
### Host Identity
@@ -224,7 +224,7 @@ HOST2_SSH_KEY="/root/.ssh/Jayred365-rsync-key"
```bash
GITEA_CONTAINER="Gitea"
GITEA_REPO_PATH="Varaverk/varaverk.git"
TARGET_DIR="/mnt/user/appdata/varaverk"
TARGET_DIR="/mnt/user/appdata/Varaverk"
GITEA_SSH_KEY="/root/.ssh/unraid_gitea"
SSH_PORT=221
```
@@ -274,8 +274,8 @@ to their unprefixed names. Scripts only ever reference the unprefixed name — t
work identically on both servers.
```bash
nano /mnt/user/appdata/varaverk/host1.conf # on HOST1
nano /mnt/user/appdata/varaverk/host2.conf # on HOST2
nano /mnt/user/appdata/Varaverk/host1.conf # on HOST1
nano /mnt/user/appdata/Varaverk/host2.conf # on HOST2
```
Every variable is documented in the conf files. Key values to set:
@@ -432,7 +432,7 @@ Individual scripts are never scheduled directly except the 30-minute Emby sync.
```bash
#!/bin/bash
bash /mnt/user/appdata/varaverk/Orchestrators/array_started.sh
bash /mnt/user/appdata/Varaverk/Orchestrators/array_started.sh
# Schedule: At Startup of Array
# Run as: Background Task
```
@@ -447,28 +447,28 @@ Watchdogs (resource, docker, system, stability) run separately via watchdog_orch
```bash
# Every 30 minutes — Emby dirty sync:
*/30 * * * *
bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
/mnt/user/Media_Server/Emby --profile=emby-fallback
# Every 6 hours — failed import + stalled download recovery:
0 */6 * * *
bash /mnt/user/appdata/varaverk/Orchestrators/arrs_failed_stalled_recovery.sh
bash /mnt/user/appdata/Varaverk/Orchestrators/arrs_failed_stalled_recovery.sh
# 1am daily — full maintenance window:
0 1 * * *
bash /mnt/user/appdata/varaverk/Orchestrators/daily_sync_maintenance.sh
bash /mnt/user/appdata/Varaverk/Orchestrators/daily_sync_maintenance.sh
# 2:30am Sunday — weekly maintenance window:
30 2 * * 0
bash /mnt/user/appdata/varaverk/Orchestrators/weekly_sync_maintenance.sh
bash /mnt/user/appdata/Varaverk/Orchestrators/weekly_sync_maintenance.sh
# 8am daily — health digest:
0 8 * * *
bash /mnt/user/appdata/varaverk/Monitors/weekly_health_digest.sh
bash /mnt/user/appdata/Varaverk/Monitors/weekly_health_digest.sh
# Every 6 hours — inotify + php-fpm snapshot:
0 */6 * * *
bash /mnt/user/appdata/varaverk/Monitors/system_tuning_monitor.sh
bash /mnt/user/appdata/Varaverk/Monitors/system_tuning_monitor.sh
# Sunday morning — weekly reports:
0 6 * * 0 bash .../Monitors/zfs_memory_snapshot.sh
@@ -491,7 +491,7 @@ Test with `--dry-run` first — all pre-flight checks run, no changes made.
### Test a Single Profile Sync
```bash
bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
/mnt/user/appdata-Fallback/Arrs_Stack --dry-run --log
```
@@ -514,13 +514,13 @@ Expected output (healthy):
### Test the Daily Orchestrator
```bash
bash /mnt/user/appdata/varaverk/Orchestrators/daily_sync_maintenance.sh --dry-run
bash /mnt/user/appdata/Varaverk/Orchestrators/daily_sync_maintenance.sh --dry-run
```
### Check Configuration Resolution
```bash
bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
/mnt/user/appdata-Fallback/Arrs_Stack --status
```
@@ -532,10 +532,10 @@ If HOST2 is being set up from scratch with empty shares:
```bash
# Create share directories on HOST2:
bash /mnt/user/appdata/varaverk/Tools/recreate_shares.sh
bash /mnt/user/appdata/Varaverk/Tools/recreate_shares.sh
# Initial push from HOST1 — first run may take several hours for large libraries:
bash /mnt/user/appdata/varaverk/Orchestrators/daily_sync_maintenance.sh --log
bash /mnt/user/appdata/Varaverk/Orchestrators/daily_sync_maintenance.sh --log
```
The scheduled nightly sync will be incremental after the initial push.
@@ -584,7 +584,7 @@ ssh -i /root/.ssh/gmer4lfe_rsync_automation \
# If password prompted: key not authorised — re-run ssh_setup.sh
# Re-run setup (idempotent, re-copies key to remote):
bash /mnt/user/appdata/varaverk/Partnership/ssh_setup.sh
bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh
```
### Pre-flight Aborts on Remote Rootfs
+228 -228
View File
@@ -40,10 +40,10 @@
# --log verbose output — every decision logged
#
# ── PATHS ─────────────────────────────────────────────────────────────────────────────────────
# Scripts: /mnt/user/appdata/varaverk/
# Configuration: /mnt/user/appdata/varaverk/master.conf
# Per-host: /mnt/user/appdata/varaverk/host1.conf (or host2.conf)
# Library: /mnt/user/appdata/varaverk/common.sh
# Scripts: /mnt/user/appdata/Varaverk/
# Configuration: /mnt/user/appdata/Varaverk/master.conf
# Per-host: /mnt/user/appdata/Varaverk/host1.conf (or host2.conf)
# Library: /mnt/user/appdata/Varaverk/common.sh
#
# ── PLUGIN SETTINGS (apply to every entry) ────────────────────────────────────────────────────
# Run in background: YES — required for all scripts, even one-shots
@@ -135,7 +135,7 @@
# They are now single-pass scripts called every 15 minutes by watchdog_orchestrator.sh (see below).
# Remove them from ARRAY_START_SCRIPTS in master.conf if present.
#
# bash /mnt/user/appdata/varaverk/Orchestrators/array_started.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/array_started.sh
# ── ARRAY STOPPING ────────────────────────────────────────────────────────────────────────────
@@ -155,9 +155,9 @@
# A failed step is logged and notified but does not prevent remaining steps from running.
# Unlike array_started.sh, all steps run in the foreground — each confirmed done before next.
#
# bash /mnt/user/appdata/varaverk/Orchestrators/array_stopping.sh
# bash /mnt/user/appdata/varaverk/Orchestrators/array_stopping.sh --dry-run
# bash /mnt/user/appdata/varaverk/Orchestrators/array_stopping.sh --status
# bash /mnt/user/appdata/Varaverk/Orchestrators/array_stopping.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/array_stopping.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Orchestrators/array_stopping.sh --status
# ── WATCHDOG ORCHESTRATOR ─────────────────────────────────────────────────────────────────────
@@ -182,9 +182,9 @@
# Overlap protection: acquire_lock() exits immediately if a prior cycle is still running —
# prevents pile-up when a restart attempt or daemon check takes longer than 15 minutes.
#
# bash /mnt/user/appdata/varaverk/Orchestrators/watchdog_orchestrator.sh
# bash /mnt/user/appdata/varaverk/Orchestrators/watchdog_orchestrator.sh --dry-run
# bash /mnt/user/appdata/varaverk/Orchestrators/watchdog_orchestrator.sh --status
# bash /mnt/user/appdata/Varaverk/Orchestrators/watchdog_orchestrator.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/watchdog_orchestrator.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Orchestrators/watchdog_orchestrator.sh --status
# ── TRANSCODE MANAGEMENT ──────────────────────────────────────────────────────────────────────
@@ -212,7 +212,7 @@
# --mount type=bind,source=/mnt/ram-transcode,target=/ext-ram-transcode,bind-propagation=shared
# Without shared propagation, symlink flips are silently ignored after the first flip.
#
# bash /mnt/user/appdata/varaverk/Orchestrators/transcode_management.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/transcode_management.sh
# ── CRITICAL SYNC MAINTENANCE ─────────────────────────────────────────────────────────────────
@@ -237,7 +237,7 @@
#
# Silent on clean cycles: runs 48 times per day, no output when healthy.
#
# bash /mnt/user/appdata/varaverk/Orchestrators/critical_sync_maintenance.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/critical_sync_maintenance.sh
# ── INTERMEDIATE SYNC MAINTENANCE ────────────────────────────────────────────────────────────
@@ -264,7 +264,7 @@
#
# Silent on success — runs 6x/day, only failures produce notification.
#
# bash /mnt/user/appdata/varaverk/Orchestrators/intermediate_sync_maintenance.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/intermediate_sync_maintenance.sh
# ── DAILY SYNC MAINTENANCE ────────────────────────────────────────────────────────────────────
@@ -291,7 +291,7 @@
#
# Notify: silent on success. One failure notification with job list on any failure.
#
# bash /mnt/user/appdata/varaverk/Orchestrators/daily_sync_maintenance.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/daily_sync_maintenance.sh
# ── RSYNC EMBY FALLBACK ───────────────────────────────────────────────────────────────────────
@@ -306,7 +306,7 @@
# After: HOST2 Emby restarts to pick up any config changes from the sync.
# Result: if HOST1 fails, users resume from at most 30 minutes stale.
#
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
# /mnt/user/Media_Server/Emby --profile=emby-fallback
@@ -342,7 +342,7 @@
# Nightly sync resets that cache — cold loads every morning. Weekly: cache warm 6 days,
# resets Sunday night while users sleep.
#
# bash /mnt/user/appdata/varaverk/Orchestrators/weekly_sync_maintenance.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/weekly_sync_maintenance.sh
# ── MONTHLY MAINTENANCE ───────────────────────────────────────────────────────────────────────
@@ -361,10 +361,10 @@
# zfs_pool_scrub.sh ZFS pool integrity scrub (Tools/)
# smart_long_test.sh SMART extended drive health test (Tools/)
#
# bash /mnt/user/appdata/varaverk/Orchestrators/monthly_maintenance.sh
# bash /mnt/user/appdata/varaverk/Orchestrators/monthly_maintenance.sh --dry-run
# bash /mnt/user/appdata/varaverk/Orchestrators/monthly_maintenance.sh --status
# bash /mnt/user/appdata/varaverk/Orchestrators/monthly_maintenance.sh --force
# bash /mnt/user/appdata/Varaverk/Orchestrators/monthly_maintenance.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/monthly_maintenance.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Orchestrators/monthly_maintenance.sh --status
# bash /mnt/user/appdata/Varaverk/Orchestrators/monthly_maintenance.sh --force
# ── SUNDAY MORNING COFFEE REPORT ─────────────────────────────────────────────────────────────
@@ -388,7 +388,7 @@
# Footer: ✅ enjoy your Sunday ☕ OR ⚠️ N issue(s) need attention
# Delivery: unRAID notification + Discord webhook (if DISCORD_WEBHOOK configured)
#
# bash /mnt/user/appdata/varaverk/Orchestrators/sunday_morning_coffee_report.sh
# bash /mnt/user/appdata/Varaverk/Orchestrators/sunday_morning_coffee_report.sh
# ── WEEKLY HEALTH DIGEST ─────────────────────────────────────────────────────────────────────
@@ -408,7 +408,7 @@
# Data sources: fallback state, watchdog strike files, container skip list,
# bandwidth log, transcode daily log, cert expiry (live openssl check)
#
# bash /mnt/user/appdata/varaverk/Monitors/weekly_health_digest.sh
# bash /mnt/user/appdata/Varaverk/Monitors/weekly_health_digest.sh
# ── SYSTEM TUNING MONITOR ────────────────────────────────────────────────────────────────────
@@ -427,7 +427,7 @@
#
# Log: TUNING_MONITOR_LOG — bounded, trimmed to TUNING_LOG_RETENTION days on each write.
#
# bash /mnt/user/appdata/varaverk/Monitors/system_tuning_monitor.sh
# bash /mnt/user/appdata/Varaverk/Monitors/system_tuning_monitor.sh
# ── SUNDAY MONITOR BLOCK ─────────────────────────────────────────────────────────────────────
@@ -478,9 +478,9 @@
# DDNS: one domain, one DDNS container active at all times. Split-brain prevented by design.
# Handback: stop remote DDNS → rsync writeback → start containers → start local DDNS.
#
# bash /mnt/user/appdata/varaverk/Fallback/fallback.sh
# bash /mnt/user/appdata/varaverk/Fallback/fallback.sh --status
# bash /mnt/user/appdata/varaverk/Fallback/fallback.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Fallback/fallback.sh
# bash /mnt/user/appdata/Varaverk/Fallback/fallback.sh --status
# bash /mnt/user/appdata/Varaverk/Fallback/fallback.sh --dry-run
# fallback_test.sh — controlled full-lifecycle fallback test using iptables simulation
# ALWAYS run --dry-run first. Live test starts/stops real containers — brief service interruption.
@@ -491,8 +491,8 @@
# FALLBACK_TEST_BLOCK_WAIT must be > FALLBACK_CHECK_INTERVAL + buffer (default: 150s).
# FALLBACK_TEST_HANDBACK_WAIT must cover: strike confirmation + rsync + container start (default: 360s).
#
# bash /mnt/user/appdata/varaverk/Fallback/fallback_test.sh --dry-run
# bash /mnt/user/appdata/varaverk/Fallback/fallback_test.sh
# bash /mnt/user/appdata/Varaverk/Fallback/fallback_test.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Fallback/fallback_test.sh
# fallback_state_reset.sh — reset fallback state file to NORMAL
# Resets state file ONLY — does NOT start or stop any containers.
@@ -502,9 +502,9 @@
# Verify before resetting: right containers on right server, DDNS correct,
# both servers Tailscale visible, fallback.sh not currently running.
#
# bash /mnt/user/appdata/varaverk/Tools/fallback_state_reset.sh --status
# bash /mnt/user/appdata/varaverk/Tools/fallback_state_reset.sh
# bash /mnt/user/appdata/varaverk/Tools/fallback_state_reset.sh --force
# bash /mnt/user/appdata/Varaverk/Tools/fallback_state_reset.sh --status
# bash /mnt/user/appdata/Varaverk/Tools/fallback_state_reset.sh
# bash /mnt/user/appdata/Varaverk/Tools/fallback_state_reset.sh --force
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -526,23 +526,23 @@
# emby-fallback nothing stopped (Emby stays running — dirty sync, WAL/SHM excluded)
# [no profile] no containers stopped (media shares, plain data)
#
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
# /mnt/user/appdata-Fallback/Critical-Data
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
# /mnt/user/appdata-Fallback/Important-Data
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
# /mnt/user/appdata-Fallback/Arrs_Stack
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
# /mnt/user/Media_Server/Emby --profile=emby
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
# /mnt/user/Media_Server/Emby --profile=emby-fallback
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh \
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \
# /mnt/user/appdata-Fallback/Gmer4Lfe
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh /mnt/user/Movies
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh /mnt/user/Tv_Shows
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh /mnt/user/Music
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh /mnt/user/Anime_Shows
# bash /mnt/user/appdata/varaverk/Rsync/rsync.sh /mnt/user/Anime_Movies
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh /mnt/user/Movies
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh /mnt/user/Tv_Shows
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh /mnt/user/Music
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh /mnt/user/Anime_Shows
# bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh /mnt/user/Anime_Movies
# rsync_stop.sh — stop rsync intelligently on local and remote
# Smart mode (default): kills rsync subprocess only, orchestrator exits cleanly,
@@ -550,9 +550,9 @@
# --full-stop: kills orchestrator first then rsync — emergency full stop.
# --rsync-only: stop rsync, skip container recovery check (used by partnership_manager --offboard).
#
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/rsync_stop.sh --status
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/rsync_stop.sh
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/rsync_stop.sh --full-stop
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/rsync_stop.sh --status
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/rsync_stop.sh
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/rsync_stop.sh --full-stop
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -581,8 +581,8 @@
# RAM emergency: reads mem_shutdown_active from system_watchdog state file, defers all restarts
# Silent on clean cycles — only outputs events and hourly heartbeat
#
# bash /mnt/user/appdata/varaverk/Watchdogs/docker_watchdog.sh --status
# bash /mnt/user/appdata/varaverk/Watchdogs/docker_watchdog.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Watchdogs/docker_watchdog.sh --status
# bash /mnt/user/appdata/Varaverk/Watchdogs/docker_watchdog.sh --dry-run
# watchdog_skip_list_manager.sh — view and manage the container skip list
# When docker_watchdog restarts the same container 3 times in 1hr → skip-listed.
@@ -597,11 +597,11 @@
# docker start ContainerName → confirm fix works before handing back to watchdog
# watchdog resumes normal monitoring on next cycle automatically
#
# bash /mnt/user/appdata/varaverk/Tools/watchdog_skip_list_manager.sh --status
# bash /mnt/user/appdata/varaverk/Tools/watchdog_skip_list_manager.sh --clear ContainerName
# bash /mnt/user/appdata/varaverk/Tools/watchdog_skip_list_manager.sh --clear ContainerName --force
# bash /mnt/user/appdata/varaverk/Tools/watchdog_skip_list_manager.sh --clear-all
# bash /mnt/user/appdata/varaverk/Tools/watchdog_skip_list_manager.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Tools/watchdog_skip_list_manager.sh --status
# bash /mnt/user/appdata/Varaverk/Tools/watchdog_skip_list_manager.sh --clear ContainerName
# bash /mnt/user/appdata/Varaverk/Tools/watchdog_skip_list_manager.sh --clear ContainerName --force
# bash /mnt/user/appdata/Varaverk/Tools/watchdog_skip_list_manager.sh --clear-all
# bash /mnt/user/appdata/Varaverk/Tools/watchdog_skip_list_manager.sh --dry-run
# docker_container_stop.sh — stop all running containers sequentially with verification
# Called by array_stopping.sh as the final step in the planned shutdown sequence.
@@ -614,9 +614,9 @@
# docker kill (SIGKILL) if all retries exhausted
# Notify on any container that cannot be stopped
#
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_container_stop.sh --status
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_container_stop.sh --dry-run
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_container_stop.sh
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_container_stop.sh --status
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_container_stop.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_container_stop.sh
# docker_daily_restart.sh — restart degradation-prone containers nightly
# Called by daily_sync_maintenance.sh. Also safe to run ad hoc.
@@ -626,9 +626,9 @@
# Configured via HOST*_DAILY_RESTART_CONTAINERS (host*.conf):
# NginxProxyManager, Authelia, Dispatcharr, Dispatcharr-Basic, ErsatzTV-Emby
#
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_daily_restart.sh --dry-run
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_daily_restart.sh --status
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_daily_restart.sh
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_daily_restart.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_daily_restart.sh --status
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_daily_restart.sh
# docker_weekly_restart.sh — restart less-critical services weekly
# Called by weekly_sync_maintenance.sh after sync completes and containers are back up.
@@ -637,9 +637,9 @@
# Configured via HOST*_WEEKLY_RESTART_CONTAINERS (host*.conf):
# NextCloud, AdGuard-Home, Immich
#
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_weekly_restart.sh --dry-run
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_weekly_restart.sh --status
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_weekly_restart.sh
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_weekly_restart.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_weekly_restart.sh --status
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_weekly_restart.sh
# docker_network_connect.sh — ensure custom networks exist and containers are connected
# Called by array_started.sh. Idempotent — silent when everything is already correct.
@@ -648,9 +648,9 @@
# Configured via HOST*_NETWORK_CONNECT_NETWORKS and HOST*_NETWORK_CONNECT_CONTAINERS.
# Use after unRAID updates when containers can't reach each other on custom networks.
#
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_network_connect.sh --status
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_network_connect.sh --dry-run
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_network_connect.sh
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_network_connect.sh --status
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_network_connect.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_network_connect.sh
# docker_update.sh — pull latest images for daily restart containers, no downtime
# Called by daily_sync_maintenance.sh BEFORE docker_daily_restart.sh.
@@ -659,9 +659,9 @@
# Reports "updated" vs "already current" per container — useful to see what actually changed.
# Toggle: DAILY_CONTAINER_UPDATES=false in master.conf skips all pulls, restart still runs.
#
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_update.sh --dry-run
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_update.sh --status
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_update.sh
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_update.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_update.sh --status
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_update.sh
# docker_update_remaining.sh — pull latest images for all containers not in daily/weekly lists
# Called by weekly_sync_maintenance.sh at the end of the Sunday window.
@@ -671,9 +671,9 @@
# at least one image pull per week with no second list to maintain.
# Toggle: WEEKLY_REMAINING_UPDATES=false in master.conf skips all pulls.
#
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_update_remaining.sh --dry-run
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_update_remaining.sh --status
# bash /mnt/user/appdata/varaverk/Docker_Essentials/docker_update_remaining.sh
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_update_remaining.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_update_remaining.sh --status
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/docker_update_remaining.sh
# downloaders_reset.sh — maintenance reset for all download clients on this server
# Called every 30 minutes by critical_sync_maintenance.sh via CRITICAL_MAINTENANCE_SCRIPTS.
@@ -692,9 +692,9 @@
# Age failsafe — removes torrents older than QBIT_FAILSAFE_MIN_DAYS
# deleteFiles=false — leaves files for arrs to manage
#
# bash /mnt/user/appdata/varaverk/Docker_Essentials/downloaders_reset.sh --dry-run
# bash /mnt/user/appdata/varaverk/Docker_Essentials/downloaders_reset.sh --status
# bash /mnt/user/appdata/varaverk/Docker_Essentials/downloaders_reset.sh
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/downloaders_reset.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/downloaders_reset.sh --status
# bash /mnt/user/appdata/Varaverk/Docker_Essentials/downloaders_reset.sh
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -726,8 +726,8 @@
# Reboot loop protection: N reboots in X hours → shutdown instead.
# State file heartbeat: writes watchdog_cycle=N every cycle (docker_watchdog stale guard).
#
# bash /mnt/user/appdata/varaverk/Watchdogs/stability_watchdog.sh --status
# bash /mnt/user/appdata/varaverk/Watchdogs/stability_watchdog.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Watchdogs/stability_watchdog.sh --status
# bash /mnt/user/appdata/Varaverk/Watchdogs/stability_watchdog.sh --dry-run
# storage_watchdog.sh — pool growth + runaway log detection (single-pass, called by system_watchdog)
# Part of SYSTEM_WATCHDOG_SCRIPTS — not scheduled directly. Called by system_watchdog.sh each cycle.
@@ -745,8 +745,8 @@
# WATCHDOG_APPDATA_TRUNCATE_LOGS=false → critical notify, hold strikes until resolved
# Condition resolves (growth stops / log shrinks) → strikes auto-clear.
#
# bash /mnt/user/appdata/varaverk/Watchdogs/System/storage_watchdog.sh --status
# bash /mnt/user/appdata/varaverk/Watchdogs/System/storage_watchdog.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Watchdogs/System/storage_watchdog.sh --status
# bash /mnt/user/appdata/Varaverk/Watchdogs/System/storage_watchdog.sh --dry-run
# network_watchdog.sh — internet + DDNS + Tailscale + NPM proxy checks (called by system_watchdog)
# Part of SYSTEM_WATCHDOG_SCRIPTS — not scheduled directly. Called by system_watchdog.sh each cycle.
@@ -759,8 +759,8 @@
# 2-strike system: Strike 1 = warn + notify. Strike 2 = restart NginxProxyManager + notify.
# Strikes auto-clear when the external URL becomes reachable again.
#
# bash /mnt/user/appdata/varaverk/Watchdogs/System/network_watchdog.sh --status
# bash /mnt/user/appdata/varaverk/Watchdogs/System/network_watchdog.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Watchdogs/System/network_watchdog.sh --status
# bash /mnt/user/appdata/Varaverk/Watchdogs/System/network_watchdog.sh --dry-run
# resource_watchdog.sh — three-level pressure reduction layer (single-pass, called by watchdog_orchestrator)
# Reduces system load intelligently BEFORE docker_watchdog attempts container restarts.
@@ -776,9 +776,9 @@
# Coordination: at Level 3 writes mem_shutdown_active=true → docker_watchdog defers all restarts.
# HOST*_RW_PAUSE_CONTAINERS and HOST*_RW_STOP_CONTAINERS configured per host in host*.conf.
#
# bash /mnt/user/appdata/varaverk/Watchdogs/resource_watchdog.sh --status
# bash /mnt/user/appdata/varaverk/Watchdogs/resource_watchdog.sh --dry-run
# bash /mnt/user/appdata/varaverk/Watchdogs/resource_watchdog.sh
# bash /mnt/user/appdata/Varaverk/Watchdogs/resource_watchdog.sh --status
# bash /mnt/user/appdata/Varaverk/Watchdogs/resource_watchdog.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Watchdogs/resource_watchdog.sh
# inotify_tuning.sh — raise Linux inotify kernel limits at array start
# Called by array_started.sh FIRST — must run before containers start (they inherit limits).
@@ -792,8 +792,8 @@
# If Code-Server started before this ran → docker restart Code-Server to inherit new limits.
# Exhaustion symptom: downloads complete but arrs don't detect them, Live TV stutters.
#
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/inotify_tuning.sh --status
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/inotify_tuning.sh
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/inotify_tuning.sh --status
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/inotify_tuning.sh
# php_fpm_max_children.sh — set PHP-FPM pm.max_children at array start
# Called by array_started.sh. Default is 4-8 workers — inadequate for a busy multi-user server.
@@ -801,8 +801,8 @@
# Symptom of saturation: WebGUI slow, settings saves hang, container UI starts timeout.
# Resets on each reboot — reapplied at array start. Idempotent: silent when already correct.
#
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/php_fpm_max_children.sh --status
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/php_fpm_max_children.sh
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/php_fpm_max_children.sh --status
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/php_fpm_max_children.sh
# docker_syslog_filter.sh — suppress Docker veth/docker0 interface log noise
# Called by array_started.sh before containers start. Creates rsyslog drop rule.
@@ -810,29 +810,29 @@
# Real events (mount failures, permission errors) are invisible in that noise.
# Idempotent: compares expected filter content exactly — only writes when changed.
#
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/docker_syslog_filter.sh --status
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/docker_syslog_filter.sh
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/docker_syslog_filter.sh --status
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/docker_syslog_filter.sh
# webgui_watchdog.sh — WebGUI availability watchdog (called by system_watchdog via SYSTEM_WATCHDOG_SCRIPTS)
# Not scheduled directly — runs as part of the every-15-minute watchdog chain.
# Escalation: nginx → php-fpm → emhttp, each with recheck before proceeding to next level.
# bash /mnt/user/appdata/varaverk/Watchdogs/System/webgui_watchdog.sh --dry-run
# bash /mnt/user/appdata/varaverk/Watchdogs/System/webgui_watchdog.sh --status
# bash /mnt/user/appdata/Varaverk/Watchdogs/System/webgui_watchdog.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Watchdogs/System/webgui_watchdog.sh --status
# clear_logs.sh — size-threshold log cleanup (called by weekly_sync_maintenance via WEEKLY_MAINTENANCE_SCRIPTS)
# Not scheduled directly — runs as part of the Sunday 2:30am weekly window.
# System logs only cleared if > LOG_MIN_SIZE_MB (10MB). Docker logs only if > LOG_DOCKER_MAX_MB (100MB).
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/clear_logs.sh --dry-run
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/clear_logs.sh --status
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/clear_logs.sh --dry-run
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/clear_logs.sh --status
# mover_stop.sh — stop unRAID mover cleanly before array operations
# Wall message to logged-in users. Waits MOVER_STOP_TIMEOUT seconds.
# SIGTERM (allows mover to finish current file — no partial files). Verify. SIGKILL last resort.
# Use before: planned reboots with mover running, disk replacement, array maintenance.
#
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/mover_stop.sh --status
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/mover_stop.sh --dry-run
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/mover_stop.sh
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/mover_stop.sh --status
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/mover_stop.sh --dry-run
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/mover_stop.sh
# server_reboot.sh — graceful reboot with pre-flight warnings and clean shutdown sequence
# Pre-flight warnings (inform not block): rsync running, mover running, active Emby sessions.
@@ -840,9 +840,9 @@
# → wait REBOOT_VM_WAIT → stop libvirt → stop Docker → sync → /sbin/reboot
# --dry-run walks the full sequence without rebooting — shows all active processes.
#
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/server_reboot.sh --dry-run
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/server_reboot.sh --status
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/server_reboot.sh
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/server_reboot.sh --dry-run
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/server_reboot.sh --status
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/server_reboot.sh
# user_scripts_stop.sh — stop all running User Script processes
# Finds processes by /tmp/user.scripts path signature. Shows script names, not just PIDs.
@@ -850,15 +850,15 @@
# Use when plugin Abort button didn't work, or before a reboot to clean up running scripts.
# Called automatically by server_reboot.sh before reboot.
#
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/user_scripts_stop.sh --status
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/user_scripts_stop.sh --dry-run
# bash /mnt/user/appdata/varaverk/unRAID_Essentials/user_scripts_stop.sh
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/user_scripts_stop.sh --status
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/user_scripts_stop.sh --dry-run
# bash /mnt/user/appdata/Varaverk/unRAID_Essentials/user_scripts_stop.sh
# git_pull_execute.sh — pull latest scripts from Gitea and set execute permissions
# Deployment mechanism for the ecosystem. Push from VS Code → Gitea → run on both servers.
# Called automatically by daily_sync_maintenance.sh as the first job in the daily window.
#
# bash /mnt/user/appdata/varaverk/git_pull_execute.sh
# bash /mnt/user/appdata/Varaverk/git_pull_execute.sh
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -880,9 +880,9 @@
# rsync without --chown flag, admin copies directly into share.
# Correct PUID/PGID in Docker template env vars is the permanent fix — this is the safety net.
#
# bash /mnt/user/appdata/varaverk/Media/media_shares_permissions.sh --dry-run
# bash /mnt/user/appdata/varaverk/Media/media_shares_permissions.sh --status
# bash /mnt/user/appdata/varaverk/Media/media_shares_permissions.sh
# bash /mnt/user/appdata/Varaverk/Media/media_shares_permissions.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Media/media_shares_permissions.sh --status
# bash /mnt/user/appdata/Varaverk/Media/media_shares_permissions.sh
# media_cleaner.sh — remove scene junk files from media share folders
# Run BEFORE arr cleanup — removes non-media files that would otherwise appear as orphans.
@@ -893,10 +893,10 @@
# media HOST*_MEDIA_CLEAN_FOLDERS — Movies, Tv_Shows, Music, Sports etc.
# ALWAYS --dry-run when adding new patterns or folders — verify before committing.
#
# bash /mnt/user/appdata/varaverk/Media/media_cleaner.sh anime --dry-run
# bash /mnt/user/appdata/varaverk/Media/media_cleaner.sh media --dry-run
# bash /mnt/user/appdata/varaverk/Media/media_cleaner.sh anime
# bash /mnt/user/appdata/varaverk/Media/media_cleaner.sh media
# bash /mnt/user/appdata/Varaverk/Media/media_cleaner.sh anime --dry-run
# bash /mnt/user/appdata/Varaverk/Media/media_cleaner.sh media --dry-run
# bash /mnt/user/appdata/Varaverk/Media/media_cleaner.sh anime
# bash /mnt/user/appdata/Varaverk/Media/media_cleaner.sh media
# lidarr_cleanup.sh — delete orphaned music files not tracked by Lidarr
# HOST1 ONLY — HOST1 owns /mnt/user/Music and runs Lidarr. Exits cleanly on HOST2.
@@ -919,9 +919,9 @@
# NUCLEAR MODE (use with full understanding): --i-know-what-im-doing --skip-strike-list
# Both flags: age check bypassed + size gate bypassed. Deletes everything not tracked.
#
# bash /mnt/user/appdata/varaverk/Media/lidarr_cleanup.sh --dry-run --log
# bash /mnt/user/appdata/varaverk/Media/lidarr_cleanup.sh --status
# bash /mnt/user/appdata/varaverk/Media/lidarr_cleanup.sh
# bash /mnt/user/appdata/Varaverk/Media/lidarr_cleanup.sh --dry-run --log
# bash /mnt/user/appdata/Varaverk/Media/lidarr_cleanup.sh --status
# bash /mnt/user/appdata/Varaverk/Media/lidarr_cleanup.sh
# sonarr_cleanup.sh — delete orphaned TV files not tracked by Sonarr
# HOST-AWARE: HOST1 manages Tv_Shows (via HOST1_SONARR_TV_ROOT).
@@ -931,9 +931,9 @@
# Protected: *.jpg *.png (episode/show artwork), *.nfo, *.srt *.sub *.ass *.ssa (Bazarr subtitles)
# After deletion: notify_emby_scan() clears ghost entries from Emby library immediately.
#
# bash /mnt/user/appdata/varaverk/Media/sonarr_cleanup.sh --dry-run --log
# bash /mnt/user/appdata/varaverk/Media/sonarr_cleanup.sh --status
# bash /mnt/user/appdata/varaverk/Media/sonarr_cleanup.sh
# bash /mnt/user/appdata/Varaverk/Media/sonarr_cleanup.sh --dry-run --log
# bash /mnt/user/appdata/Varaverk/Media/sonarr_cleanup.sh --status
# bash /mnt/user/appdata/Varaverk/Media/sonarr_cleanup.sh
# radarr_cleanup.sh — delete orphaned movie files not tracked by Radarr
# HOST-AWARE: HOST1 manages Movies (via HOST1_RADARR_MOVIES_ROOT).
@@ -942,9 +942,9 @@
# Protected: *.jpg *.png (movie artwork, fanart, thumbnails), *.nfo, subtitles
# After deletion: notify_emby_scan() clears ghost entries from Emby library immediately.
#
# bash /mnt/user/appdata/varaverk/Media/radarr_cleanup.sh --dry-run --log
# bash /mnt/user/appdata/varaverk/Media/radarr_cleanup.sh --status
# bash /mnt/user/appdata/varaverk/Media/radarr_cleanup.sh
# bash /mnt/user/appdata/Varaverk/Media/radarr_cleanup.sh --dry-run --log
# bash /mnt/user/appdata/Varaverk/Media/radarr_cleanup.sh --status
# bash /mnt/user/appdata/Varaverk/Media/radarr_cleanup.sh
# arr_sync.sh — bidirectional arr library sync across all nodes in the ecosystem
# Called by intermediate_sync_maintenance.sh every 4 hours. Can be run standalone.
@@ -960,48 +960,48 @@
# --blocklist-add does three things: tombstones, deletes local, deletes all remotes via SSH.
# Files become orphans on all nodes — arr_cleanup.sh removes them on next run.
#
# bash /mnt/user/appdata/varaverk/Media/arr_sync.sh --dry-run
# bash /mnt/user/appdata/varaverk/Media/arr_sync.sh --status
# bash /mnt/user/appdata/varaverk/Media/arr_sync.sh
# bash /mnt/user/appdata/varaverk/Media/arr_sync.sh --blocklist-add radarr <tmdbId> "reason"
# bash /mnt/user/appdata/varaverk/Media/arr_sync.sh --blocklist-add sonarr <tvdbId> "reason"
# bash /mnt/user/appdata/varaverk/Media/arr_sync.sh --blocklist-add lidarr <mbid> "reason"
# bash /mnt/user/appdata/varaverk/Media/arr_sync.sh --blocklist-remove radarr <id>
# bash /mnt/user/appdata/varaverk/Media/arr_sync.sh --blocklist-list
# bash /mnt/user/appdata/Varaverk/Media/arr_sync.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Media/arr_sync.sh --status
# bash /mnt/user/appdata/Varaverk/Media/arr_sync.sh
# bash /mnt/user/appdata/Varaverk/Media/arr_sync.sh --blocklist-add radarr <tmdbId> "reason"
# bash /mnt/user/appdata/Varaverk/Media/arr_sync.sh --blocklist-add sonarr <tvdbId> "reason"
# bash /mnt/user/appdata/Varaverk/Media/arr_sync.sh --blocklist-add lidarr <mbid> "reason"
# bash /mnt/user/appdata/Varaverk/Media/arr_sync.sh --blocklist-remove radarr <id>
# bash /mnt/user/appdata/Varaverk/Media/arr_sync.sh --blocklist-list
# arrs_failed_stalled_recovery.sh — blocklist + re-search failed/stalled arr imports
# Called every 4 hours by intermediate_sync_maintenance.sh via INTERMEDIATE_MAINTENANCE_SCRIPTS.
# Finds importFailed / importPending / error / stalled items across all configured arrs.
# Age gate: items newer than ARR_IMPORT_RECOVERY_AGE (6hr) are skipped — arr may still self-retry.
# bash /mnt/user/appdata/varaverk/Media/arrs_failed_stalled_recovery.sh --dry-run
# bash /mnt/user/appdata/varaverk/Media/arrs_failed_stalled_recovery.sh --status
# bash /mnt/user/appdata/Varaverk/Media/arrs_failed_stalled_recovery.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Media/arrs_failed_stalled_recovery.sh --status
# playback_aware_lidarr_discovery.sh — behavior-driven music discovery (runs via WEEKLY_MAINTENANCE_SCRIPTS)
# Called by weekly_sync_maintenance.sh on Sunday. Can be run standalone.
# Stage 1: score artists you actually played this week in Emby (play count + recency + user diversity).
# Stage 2: run Last.fm artist.getSimilar on top seeds, score recommendations, add top results to Lidarr.
# Goal: 05 meaningful adds per run. Not bulk import — only artists likely to match your taste.
# bash /mnt/user/appdata/varaverk/Media/playback_aware_lidarr_discovery.sh --dry-run
# bash /mnt/user/appdata/varaverk/Media/playback_aware_lidarr_discovery.sh --status
# bash /mnt/user/appdata/varaverk/Media/playback_aware_lidarr_discovery.sh
# bash /mnt/user/appdata/Varaverk/Media/playback_aware_lidarr_discovery.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Media/playback_aware_lidarr_discovery.sh --status
# bash /mnt/user/appdata/Varaverk/Media/playback_aware_lidarr_discovery.sh
# playback_aware_radarr_discovery.sh — behavior-driven movie discovery (runs via WEEKLY_MAINTENANCE_SCRIPTS)
# Called by weekly_sync_maintenance.sh on Sunday. Can be run standalone.
# Stage 1: score recently watched movies in Emby, weighted by recency and TMDB rating.
# Stage 2: run TMDB recommendations on top seeds, score candidates, add top results to Radarr.
# Goal: 05 meaningful adds per run.
# bash /mnt/user/appdata/varaverk/Media/playback_aware_radarr_discovery.sh --dry-run
# bash /mnt/user/appdata/varaverk/Media/playback_aware_radarr_discovery.sh --status
# bash /mnt/user/appdata/varaverk/Media/playback_aware_radarr_discovery.sh
# bash /mnt/user/appdata/Varaverk/Media/playback_aware_radarr_discovery.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Media/playback_aware_radarr_discovery.sh --status
# bash /mnt/user/appdata/Varaverk/Media/playback_aware_radarr_discovery.sh
# playback_aware_sonarr_discovery.sh — behavior-driven TV discovery (runs via WEEKLY_MAINTENANCE_SCRIPTS)
# Called by weekly_sync_maintenance.sh on Sunday. Can be run standalone.
# Stage 1: score recently watched series in Emby (user diversity + recency + per-user-capped episodes).
# Stage 2: run TMDB TV recommendations on top seeds, score candidates, add top results to Sonarr.
# Goal: 03 meaningful adds per run.
# bash /mnt/user/appdata/varaverk/Media/playback_aware_sonarr_discovery.sh --dry-run
# bash /mnt/user/appdata/varaverk/Media/playback_aware_sonarr_discovery.sh --status
# bash /mnt/user/appdata/varaverk/Media/playback_aware_sonarr_discovery.sh
# bash /mnt/user/appdata/Varaverk/Media/playback_aware_sonarr_discovery.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Media/playback_aware_sonarr_discovery.sh --status
# bash /mnt/user/appdata/Varaverk/Media/playback_aware_sonarr_discovery.sh
# lidarr_missing_art.sh — fetch missing album and artist artwork for the Lidarr music library
# Called by intermediate_sync_maintenance.sh via INTERMEDIATE_MAINTENANCE_SCRIPTS.
@@ -1014,9 +1014,9 @@
# Artist: folder.jpg fanart.jpg logo.png banner.jpg
# Sources: fanart.tv → iTunes (album) / Deezer / Last.fm (artist) fallbacks
#
# bash /mnt/user/appdata/varaverk/Media/lidarr_missing_art.sh --dry-run --log
# bash /mnt/user/appdata/varaverk/Media/lidarr_missing_art.sh --status
# bash /mnt/user/appdata/varaverk/Media/lidarr_missing_art.sh
# bash /mnt/user/appdata/Varaverk/Media/lidarr_missing_art.sh --dry-run --log
# bash /mnt/user/appdata/Varaverk/Media/lidarr_missing_art.sh --status
# bash /mnt/user/appdata/Varaverk/Media/lidarr_missing_art.sh
# radarr_tmdb_removed.sh — remove movies dropped from TMDb (status="deleted")
# These generate Radarr system health errors and can never be monitored or downloaded.
@@ -1025,20 +1025,20 @@
# Import exclusion added by default — prevents Radarr re-adding the same dropped movie.
# HOST1 only — exits cleanly on HOST2.
#
# bash /mnt/user/appdata/varaverk/Media/radarr_tmdb_removed.sh --dry-run
# bash /mnt/user/appdata/varaverk/Media/radarr_tmdb_removed.sh --status
# bash /mnt/user/appdata/varaverk/Media/radarr_tmdb_removed.sh
# bash /mnt/user/appdata/varaverk/Media/radarr_tmdb_removed.sh --delete-files
# bash /mnt/user/appdata/Varaverk/Media/radarr_tmdb_removed.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Media/radarr_tmdb_removed.sh --status
# bash /mnt/user/appdata/Varaverk/Media/radarr_tmdb_removed.sh
# bash /mnt/user/appdata/Varaverk/Media/radarr_tmdb_removed.sh --delete-files
# sonarr_tvdb_removed.sh — remove series dropped from TVDB (status="deleted")
# Same pattern as radarr_tmdb_removed: Sonarr health errors, can't be monitored.
# Files NOT deleted by default — use --delete-files to also remove from disk.
# Import exclusion added by default. HOST1 only.
#
# bash /mnt/user/appdata/varaverk/Media/sonarr_tvdb_removed.sh --dry-run
# bash /mnt/user/appdata/varaverk/Media/sonarr_tvdb_removed.sh --status
# bash /mnt/user/appdata/varaverk/Media/sonarr_tvdb_removed.sh
# bash /mnt/user/appdata/varaverk/Media/sonarr_tvdb_removed.sh --delete-files
# bash /mnt/user/appdata/Varaverk/Media/sonarr_tvdb_removed.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Media/sonarr_tvdb_removed.sh --status
# bash /mnt/user/appdata/Varaverk/Media/sonarr_tvdb_removed.sh
# bash /mnt/user/appdata/Varaverk/Media/sonarr_tvdb_removed.sh --delete-files
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -1066,9 +1066,9 @@
# readlink /mnt/ram-transcode should show /mnt/ramdisk_transcodes
# ls /mnt/ramdisk_transcodes/ should show transcoding-temp/
#
# bash /mnt/user/appdata/varaverk/Transcodes/ramdisk_setup.sh --status
# bash /mnt/user/appdata/varaverk/Transcodes/ramdisk_setup.sh --dry-run
# bash /mnt/user/appdata/varaverk/Transcodes/ramdisk_setup.sh
# bash /mnt/user/appdata/Varaverk/Transcodes/ramdisk_setup.sh --status
# bash /mnt/user/appdata/Varaverk/Transcodes/ramdisk_setup.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Transcodes/ramdisk_setup.sh
# transcode_manager.sh — manage ramdisk/SSD symlink based on current usage
# Called by transcode_management.sh AFTER cleanup. Can be run standalone for testing.
@@ -1087,9 +1087,9 @@
# Multi-server: TRANSCODE_SERVERS array supports Emby, Jellyfin, Plex
# DO NOT add Tdarr here — full-file encoding fills ramdisk rapidly.
#
# bash /mnt/user/appdata/varaverk/Transcodes/transcode_manager.sh --status
# bash /mnt/user/appdata/varaverk/Transcodes/transcode_manager.sh --dry-run
# bash /mnt/user/appdata/varaverk/Transcodes/transcode_manager.sh
# bash /mnt/user/appdata/Varaverk/Transcodes/transcode_manager.sh --status
# bash /mnt/user/appdata/Varaverk/Transcodes/transcode_manager.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Transcodes/transcode_manager.sh
# transcode_cleanup.sh — remove stale HLS segment files from ramdisk and SSD fallback
# Called by transcode_management.sh BEFORE transcode_manager.sh (order critical).
@@ -1098,8 +1098,8 @@
# transcoding-temp directory NEVER deleted even when empty — protects against SSD session drift.
# After cleanup: if ramdisk usage dropped below RAMDISK_LOW_GB, triggers flip-back to ramdisk.
#
# bash /mnt/user/appdata/varaverk/Transcodes/transcode_cleanup.sh --dry-run
# bash /mnt/user/appdata/varaverk/Transcodes/transcode_cleanup.sh
# bash /mnt/user/appdata/Varaverk/Transcodes/transcode_cleanup.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Transcodes/transcode_cleanup.sh
# ramdisk_stop.sh — safely stop the transcode ramdisk without interrupting Emby
# Flips the transcode symlink to the SSD fallback BEFORE unmounting so Emby continues writing.
@@ -1107,9 +1107,9 @@
# Use before: planned reboots, ramdisk size changes, ramdisk troubleshooting.
# ramdisk_setup.sh recreates and re-mounts on next array start.
#
# bash /mnt/user/appdata/varaverk/Tools/ramdisk_stop.sh --dry-run
# bash /mnt/user/appdata/varaverk/Tools/ramdisk_stop.sh --status
# bash /mnt/user/appdata/varaverk/Tools/ramdisk_stop.sh
# bash /mnt/user/appdata/Varaverk/Tools/ramdisk_stop.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Tools/ramdisk_stop.sh --status
# bash /mnt/user/appdata/Varaverk/Tools/ramdisk_stop.sh
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -1129,9 +1129,9 @@
# Kernel pressure: vmstat 3-sample snapshot.
# Output: console + /var/log/zfs-weekly-health.log (enables week-over-week comparison).
#
# bash /mnt/user/appdata/varaverk/Monitors/zfs_memory_snapshot.sh --status
# bash /mnt/user/appdata/varaverk/Monitors/zfs_memory_snapshot.sh --dry-run
# bash /mnt/user/appdata/varaverk/Monitors/zfs_memory_snapshot.sh
# bash /mnt/user/appdata/Varaverk/Monitors/zfs_memory_snapshot.sh --status
# bash /mnt/user/appdata/Varaverk/Monitors/zfs_memory_snapshot.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Monitors/zfs_memory_snapshot.sh
# smart_health.sh — drive SMART attribute monitoring
# Checks every /dev/sd* and /dev/nvme*. Drives in HOST*_SMART_IGNORE_DRIVES are skipped.
@@ -1141,9 +1141,9 @@
# temperature above thresholds, SMART overall-health FAILED (get data off immediately).
# Silent when all drives pass all checks.
#
# bash /mnt/user/appdata/varaverk/Monitors/smart_health.sh --status
# bash /mnt/user/appdata/varaverk/Monitors/smart_health.sh --dry-run
# bash /mnt/user/appdata/varaverk/Monitors/smart_health.sh
# bash /mnt/user/appdata/Varaverk/Monitors/smart_health.sh --status
# bash /mnt/user/appdata/Varaverk/Monitors/smart_health.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Monitors/smart_health.sh
# cert_monitor.sh — SSL certificate expiry via live TLS connection
# Connects via openssl s_client — checks cert actually being served to clients.
@@ -1153,9 +1153,9 @@
# Configured via HOST*_CERT_MONITOR_DOMAINS in host*.conf.
# Thresholds: > 30 days = silent, <= 30 = warning, <= CERT_CRIT_DAYS (7) = urgent.
#
# bash /mnt/user/appdata/varaverk/Monitors/cert_monitor.sh --status
# bash /mnt/user/appdata/varaverk/Monitors/cert_monitor.sh --dry-run
# bash /mnt/user/appdata/varaverk/Monitors/cert_monitor.sh
# bash /mnt/user/appdata/Varaverk/Monitors/cert_monitor.sh --status
# bash /mnt/user/appdata/Varaverk/Monitors/cert_monitor.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Monitors/cert_monitor.sh
# backup_verify.sh — rsync mirror integrity via independent MD5 checksums
# Randomly samples BACKUP_VERIFY_SAMPLE (10) files per share. Computes MD5 both sides via SSH.
@@ -1165,9 +1165,9 @@
# Pre-flight: check_connectivity() and check_remote_array() prevent false MISSING alarms.
# Notifies on MISMATCH or excessive MISSING files.
#
# bash /mnt/user/appdata/varaverk/Monitors/backup_verify.sh --status
# bash /mnt/user/appdata/varaverk/Monitors/backup_verify.sh --dry-run
# bash /mnt/user/appdata/varaverk/Monitors/backup_verify.sh
# bash /mnt/user/appdata/Varaverk/Monitors/backup_verify.sh --status
# bash /mnt/user/appdata/Varaverk/Monitors/backup_verify.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Monitors/backup_verify.sh
# emby_session_report.sh — Emby weekly streaming usage statistics
# Queries HOST*_EMBY_URL for past EMBY_REPORT_DAYS (7) days of activity.
@@ -1175,9 +1175,9 @@
# weekly play count, top EMBY_REPORT_TOP_N content, most active users.
# Notifies if transcode ratio > 80% — usually indicates client/format compatibility issue.
#
# bash /mnt/user/appdata/varaverk/Monitors/emby_session_report.sh --status
# bash /mnt/user/appdata/varaverk/Monitors/emby_session_report.sh --dry-run
# bash /mnt/user/appdata/varaverk/Monitors/emby_session_report.sh
# bash /mnt/user/appdata/Varaverk/Monitors/emby_session_report.sh --status
# bash /mnt/user/appdata/Varaverk/Monitors/emby_session_report.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Monitors/emby_session_report.sh
# bandwidth_monitor.sh — rsync transfer history and weekly summary report
# --report: reads BANDWIDTH_LOG and generates weekly summary per profile.
@@ -1187,29 +1187,29 @@
# Version-stable field names — survives rsync output format changes between versions.
# BANDWIDTH_LOG bounded to BANDWIDTH_LOG_RETENTION (90) days — never grows unbounded.
#
# bash /mnt/user/appdata/varaverk/Monitors/bandwidth_monitor.sh --report
# bash /mnt/user/appdata/varaverk/Monitors/bandwidth_monitor.sh --status
# bash /mnt/user/appdata/Varaverk/Monitors/bandwidth_monitor.sh --report
# bash /mnt/user/appdata/Varaverk/Monitors/bandwidth_monitor.sh --status
# weekly_health_digest.sh — profile-controlled ecosystem health digest (see ORCHESTRATORS)
# bash /mnt/user/appdata/varaverk/Monitors/weekly_health_digest.sh --dry-run
# bash /mnt/user/appdata/varaverk/Monitors/weekly_health_digest.sh --status
# bash /mnt/user/appdata/Varaverk/Monitors/weekly_health_digest.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Monitors/weekly_health_digest.sh --status
# system_tuning_monitor.sh — inotify + PHP-FPM trend tracking (see ORCHESTRATORS)
# bash /mnt/user/appdata/varaverk/Monitors/system_tuning_monitor.sh --status
# bash /mnt/user/appdata/Varaverk/Monitors/system_tuning_monitor.sh --status
# mesh_monitor.sh — at-a-glance view of all servers in the mesh (read-only, on demand)
# No schedule — run any time you want a current mesh snapshot. No SSH or API calls.
# Shows each node: hostname, Tailscale IP, role (owner/mirror), services covered in fallback tiers.
# Reads directly from all three conf files — does not use detect_hosts().
#
# bash /mnt/user/appdata/varaverk/Monitors/mesh_monitor.sh
# bash /mnt/user/appdata/Varaverk/Monitors/mesh_monitor.sh
# continuous_scripts_status.sh — legacy live dashboard (Old_Arch_Still_Works/)
# NOTE: watchdog architecture changed to single-pass in v2.4. This dashboard was written
# for the continuous-loop design and is no longer kept current. Use --status flags on
# individual scripts instead: docker_watchdog --status, stability_watchdog --status, etc.
#
# bash /mnt/user/appdata/varaverk/Old_Arch_Still_Works/continuous_scripts_status.sh
# bash /mnt/user/appdata/Varaverk/Old_Arch_Still_Works/continuous_scripts_status.sh
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -1239,10 +1239,10 @@
# verifies both servers healthy before proceeding. Requires confirmation string:
# "i-understand-this-transfers-ownership" (long by design — cannot type accidentally).
#
# bash /mnt/user/appdata/varaverk/Partnership/partnership_manager.sh --status
# bash /mnt/user/appdata/varaverk/Partnership/partnership_manager.sh --onboard --dry-run
# bash /mnt/user/appdata/varaverk/Partnership/partnership_manager.sh --onboard
# bash /mnt/user/appdata/varaverk/Partnership/partnership_manager.sh --unblock hostname
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_manager.sh --status
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_manager.sh --onboard --dry-run
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_manager.sh --onboard
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_manager.sh --unblock hostname
# partnership_offboard.sh — cleanly end a partnership (standalone version of --offboard)
# Role is detected automatically — run on either server. Owner path runs the full sequence:
@@ -1251,9 +1251,9 @@
# Deferred finalisation: if remote unreachable, completes automatically when reachable.
# ALWAYS --dry-run first. 10-second countdown before live execution.
#
# bash /mnt/user/appdata/varaverk/Partnership/partnership_offboard.sh --dry-run
# bash /mnt/user/appdata/varaverk/Partnership/partnership_offboard.sh --status
# bash /mnt/user/appdata/varaverk/Partnership/partnership_offboard.sh
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_offboard.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_offboard.sh --status
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_offboard.sh
# partnership_transfer.sh — transfer ownership from current owner to current mirror
# Owner only — mirror cannot initiate. Config and WebUI targets updated; containers stay.
@@ -1261,9 +1261,9 @@
# Requires confirmation string: "i-understand-this-transfers-ownership" (long by design).
# After transfer: sync direction reverses on the next fallback/critical_sync cycle.
#
# bash /mnt/user/appdata/varaverk/Partnership/partnership_transfer.sh --dry-run
# bash /mnt/user/appdata/varaverk/Partnership/partnership_transfer.sh --status
# bash /mnt/user/appdata/varaverk/Partnership/partnership_transfer.sh \
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_transfer.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_transfer.sh --status
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_transfer.sh \
# --confirm=i-understand-this-transfers-ownership
# gitea_ssh_setup.sh — generate Gitea SSH keypair and register it with Gitea via API
@@ -1271,10 +1271,10 @@
# Use --force to regenerate and re-register (e.g. after Gitea reinstall or key compromise).
# Called during onboard setup or when re-keying a server. Run after Gitea container is up.
#
# bash /mnt/user/appdata/varaverk/Partnership/gitea_ssh_setup.sh --dry-run
# bash /mnt/user/appdata/varaverk/Partnership/gitea_ssh_setup.sh --status
# bash /mnt/user/appdata/varaverk/Partnership/gitea_ssh_setup.sh
# bash /mnt/user/appdata/varaverk/Partnership/gitea_ssh_setup.sh --force
# bash /mnt/user/appdata/Varaverk/Partnership/gitea_ssh_setup.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Partnership/gitea_ssh_setup.sh --status
# bash /mnt/user/appdata/Varaverk/Partnership/gitea_ssh_setup.sh
# bash /mnt/user/appdata/Varaverk/Partnership/gitea_ssh_setup.sh --force
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -1294,11 +1294,11 @@
# At SSH_MAX_STRIKES (5): notify + return exit 2 for caller to escalate.
# Strikes reset after SSH_STRIKE_RESET_HRS (24) of clean connectivity.
#
# bash /mnt/user/appdata/varaverk/Partnership/ssh_setup.sh --dry-run
# bash /mnt/user/appdata/varaverk/Partnership/ssh_setup.sh --status
# bash /mnt/user/appdata/varaverk/Partnership/ssh_setup.sh
# bash /mnt/user/appdata/varaverk/Partnership/ssh_setup.sh --force
# bash /mnt/user/appdata/varaverk/Partnership/ssh_setup.sh --validate
# bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh --status
# bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh
# bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh --force
# bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh --validate
# partnership_onboard.sh — full partnership setup orchestrator (run once to join a partner server)
# Orchestrates the complete setup sequence in order:
@@ -1313,10 +1313,10 @@
# PARTNERSHIP_OWNER_HOST correct in master.conf.
# ALWAYS --dry-run first.
#
# bash /mnt/user/appdata/varaverk/Partnership/partnership_onboard.sh --dry-run
# bash /mnt/user/appdata/varaverk/Partnership/partnership_onboard.sh
# bash /mnt/user/appdata/varaverk/Partnership/partnership_onboard.sh --skip-ssh
# bash /mnt/user/appdata/varaverk/Partnership/partnership_onboard.sh --skip-arr-sync
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_onboard.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_onboard.sh
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_onboard.sh --skip-ssh
# bash /mnt/user/appdata/Varaverk/Partnership/partnership_onboard.sh --skip-arr-sync
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -1332,9 +1332,9 @@
# Use when: scp/cp left root:root files blocking arr operations right now.
# Accepts one or multiple paths on the same command line.
#
# bash /mnt/user/appdata/varaverk/Tools/bulk_permissions_repair.sh /mnt/user/Movies --dry-run
# bash /mnt/user/appdata/varaverk/Tools/bulk_permissions_repair.sh /mnt/user/Movies
# bash /mnt/user/appdata/varaverk/Tools/bulk_permissions_repair.sh /mnt/user/Movies /mnt/user/Music
# bash /mnt/user/appdata/Varaverk/Tools/bulk_permissions_repair.sh /mnt/user/Movies --dry-run
# bash /mnt/user/appdata/Varaverk/Tools/bulk_permissions_repair.sh /mnt/user/Movies
# bash /mnt/user/appdata/Varaverk/Tools/bulk_permissions_repair.sh /mnt/user/Movies /mnt/user/Music
# container_data_export.sh — stop container, archive appdata, verify archive, restart
# Use before: major version updates with "no rollback" migrations, pool migrations,
@@ -1343,9 +1343,9 @@
# Container is always restarted even if archiving fails — never leaves container stopped.
# Syntax: container_data_export.sh ContainerName /path/to/appdata /output/directory
#
# bash /mnt/user/appdata/varaverk/Tools/container_data_export.sh \
# bash /mnt/user/appdata/Varaverk/Tools/container_data_export.sh \
# Emby /mnt/media-servers/Media_Server/Emby /mnt/user/Backups/ --dry-run
# bash /mnt/user/appdata/varaverk/Tools/container_data_export.sh \
# bash /mnt/user/appdata/Varaverk/Tools/container_data_export.sh \
# Emby /mnt/media-servers/Media_Server/Emby /mnt/user/Backups/
# emby_database_repair.sh — SQLite integrity check on all Emby databases
@@ -1358,9 +1358,9 @@
# activity.db → CORRUPT: safe to delete (it's a log only)
# Config path detected automatically from Docker volume mounts — no configuration needed.
#
# bash /mnt/user/appdata/varaverk/Tools/emby_database_repair.sh --status
# bash /mnt/user/appdata/varaverk/Tools/emby_database_repair.sh --dry-run
# bash /mnt/user/appdata/varaverk/Tools/emby_database_repair.sh
# bash /mnt/user/appdata/Varaverk/Tools/emby_database_repair.sh --status
# bash /mnt/user/appdata/Varaverk/Tools/emby_database_repair.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Tools/emby_database_repair.sh
# zfs_pool_scrub.sh — trigger ZFS scrub on all pools, wait for completion
# ZFS checksums every block and verifies — catches silent data corruption before you
@@ -1369,29 +1369,29 @@
# Specify a pool name to scrub it specifically (bypasses the ignore list).
# Notifies when complete with error summary.
#
# bash /mnt/user/appdata/varaverk/Tools/zfs_pool_scrub.sh --dry-run
# bash /mnt/user/appdata/varaverk/Tools/zfs_pool_scrub.sh
# bash /mnt/user/appdata/varaverk/Tools/zfs_pool_scrub.sh poolname
# bash /mnt/user/appdata/Varaverk/Tools/zfs_pool_scrub.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Tools/zfs_pool_scrub.sh
# bash /mnt/user/appdata/Varaverk/Tools/zfs_pool_scrub.sh poolname
# emby_to_lidarr_sync.sh — one-shot bootstrap: add all played Emby artists to Lidarr
# Finds artists played on Emby that are not tracked in Lidarr and adds them. No scoring.
# Run once after Lidarr is set up, or any time you suspect gaps between what you listen to
# and what Lidarr monitors. Use --days N to limit lookback window.
# bash /mnt/user/appdata/varaverk/Tools/emby_to_lidarr_sync.sh --dry-run
# bash /mnt/user/appdata/varaverk/Tools/emby_to_lidarr_sync.sh --status
# bash /mnt/user/appdata/varaverk/Tools/emby_to_lidarr_sync.sh
# bash /mnt/user/appdata/Varaverk/Tools/emby_to_lidarr_sync.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Tools/emby_to_lidarr_sync.sh --status
# bash /mnt/user/appdata/Varaverk/Tools/emby_to_lidarr_sync.sh
# emby_to_radarr_sync.sh — one-shot bootstrap: add all played Emby movies to Radarr
# Same pattern as emby_to_lidarr_sync. Run once to ensure everything you've watched is monitored.
# bash /mnt/user/appdata/varaverk/Tools/emby_to_radarr_sync.sh --dry-run
# bash /mnt/user/appdata/varaverk/Tools/emby_to_radarr_sync.sh --status
# bash /mnt/user/appdata/varaverk/Tools/emby_to_radarr_sync.sh
# bash /mnt/user/appdata/Varaverk/Tools/emby_to_radarr_sync.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Tools/emby_to_radarr_sync.sh --status
# bash /mnt/user/appdata/Varaverk/Tools/emby_to_radarr_sync.sh
# emby_to_sonarr_sync.sh — one-shot bootstrap: add all played Emby series to Sonarr
# Same pattern as emby_to_lidarr_sync. Run once to ensure all watched shows are monitored.
# bash /mnt/user/appdata/varaverk/Tools/emby_to_sonarr_sync.sh --dry-run
# bash /mnt/user/appdata/varaverk/Tools/emby_to_sonarr_sync.sh --status
# bash /mnt/user/appdata/varaverk/Tools/emby_to_sonarr_sync.sh
# bash /mnt/user/appdata/Varaverk/Tools/emby_to_sonarr_sync.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Tools/emby_to_sonarr_sync.sh --status
# bash /mnt/user/appdata/Varaverk/Tools/emby_to_sonarr_sync.sh
# recreate_shares.sh — create share directories on disks after fresh install or rebuild
# Use when: share .cfg files restored to fresh install but directories missing on disks.
@@ -1399,9 +1399,9 @@
# chown nobody:users on creation. Run once — then initial rsync populates the content.
# Without this: rsync aborts "remote share missing" even though the share shows in the UI.
#
# bash /mnt/user/appdata/varaverk/Tools/recreate_shares.sh --dry-run
# bash /mnt/user/appdata/varaverk/Tools/recreate_shares.sh --status
# bash /mnt/user/appdata/varaverk/Tools/recreate_shares.sh
# bash /mnt/user/appdata/Varaverk/Tools/recreate_shares.sh --dry-run
# bash /mnt/user/appdata/Varaverk/Tools/recreate_shares.sh --status
# bash /mnt/user/appdata/Varaverk/Tools/recreate_shares.sh
# ==============================================================================================