From d22b18bf9f544027fd7dbacf183606079cc10152 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Mon, 1 Jun 2026 19:44:41 -0400 Subject: [PATCH] =?UTF-8?q?docs:=20fix=20stale=20refs=20in=20unRAID=5FEsse?= =?UTF-8?q?ntials=20Manual,=20Rsync=20Manual,=20fallback=5Fstate=5Freset?= =?UTF-8?q?=20=E2=80=94=2015min=20watchdog,=20boot=20drive=20paths,=20drop?= =?UTF-8?q?=20User=20Scripts=20setup=20instructions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rsync/Manual-Rsync.md | 95 +++++++------------ Tools/fallback_state_reset.sh | 4 +- unRAID_Essentials/Manual-Unraid_Essentials.md | 2 +- 3 files changed, 38 insertions(+), 63 deletions(-) mode change 100644 => 100755 Tools/fallback_state_reset.sh diff --git a/Rsync/Manual-Rsync.md b/Rsync/Manual-Rsync.md index d0f538f..080b9ad 100644 --- a/Rsync/Manual-Rsync.md +++ b/Rsync/Manual-Rsync.md @@ -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 /boot/config/plugins/varaverk/Partnership/ssh_setup.sh # On HOST2: -bash /mnt/user/appdata/Varaverk/Partnership/ssh_setup.sh +bash /boot/config/plugins/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 /boot/config/plugins/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 /boot/config/plugins/varaverk # Clone: GIT_SSH_COMMAND="ssh -i /root/.ssh/unraid_gitea" \ git clone git@YOUR_GITEA_HOST:Varaverk/varaverk.git \ - /mnt/user/appdata/Varaverk + /boot/config/plugins/varaverk # Make scripts executable: -find /mnt/user/appdata/Varaverk -name "*.sh" -exec chmod +x {} \; +find /boot/config/plugins/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 /boot/config/plugins/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="/boot/config/plugins/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 /boot/config/plugins/varaverk/host1.conf # on HOST1 +nano /boot/config/plugins/varaverk/host2.conf # on HOST2 ``` Every variable is documented in the conf files. Key values to set: @@ -423,64 +423,39 @@ HOST1_PERSONAL_SHARES=( --- -## ━━━ STEP 7 — USER SCRIPTS SETUP ━━━ +## ━━━ STEP 7 — SCHEDULER SETUP ━━━ -Only a small number of User Scripts entries are needed — each one an orchestrator. -Individual scripts are never scheduled directly except the 30-minute Emby sync. +Schedules are managed by the Varaverk plugin scheduler (not User Scripts). +Array start is still configured in User Scripts as a single entry. -### At Startup of Array +### At Startup of Array (User Scripts — single entry) ```bash #!/bin/bash -bash /mnt/user/appdata/Varaverk/Orchestrators/array_started.sh +bash /boot/config/plugins/varaverk/Orchestrators/array_started.sh # Schedule: At Startup of Array # Run as: Background Task ``` -This single entry launches everything defined in ARRAY_START_SCRIPTS from master.conf: -inotify_tuning, docker_syslog_filter, php_fpm_max_children, ramdisk_setup, -docker_network_connect, fallback. -Watchdogs (resource, docker, system, stability) run separately via watchdog_orchestrator. +Launches everything in ARRAY_START_SCRIPTS: api_key_renew, inotify_tuning, +docker_syslog_filter, php_fpm_max_children, ramdisk_setup, docker_network_connect, fallback. +Watchdogs run separately via watchdog_orchestrator.sh (cron — every 15 minutes). -### Cron Schedule +### Cron Schedule (Varaverk Scheduler) ```bash -# Every 30 minutes — Emby dirty sync: -*/30 * * * * -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 - -# 1am daily — full maintenance window: -0 1 * * * -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 - -# 8am daily — health digest: -0 8 * * * -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 - -# Sunday morning — weekly reports: -0 6 * * 0 bash .../Monitors/zfs_memory_snapshot.sh -0 7 * * 0 bash .../Monitors/smart_health.sh -0 9 * * 0 bash .../Monitors/cert_monitor.sh -0 10 * * 0 bash .../Monitors/backup_verify.sh -0 11 * * 0 bash .../Monitors/emby_session_report.sh -0 11 * * 0 bash .../Monitors/bandwidth_monitor.sh --report +*/7 * * * * transcode_management.sh +*/15 * * * * watchdog_orchestrator.sh +*/30 * * * * critical_sync_maintenance.sh +0 */4 * * * intermediate_sync_maintenance.sh +0 1 * * * daily_sync_maintenance.sh +0 7 * * 0 sunday_morning_coffee_report.sh +30 2 * * 0 weekly_sync_maintenance.sh +0 0 15 * * monthly_maintenance.sh ``` -Set all entries to **Background Task** — non-background tasks can appear to hang -on long-running scripts. +All entries are configured via the Varaverk scheduler UI or `schedule.json`. +Scripts live at `/boot/config/plugins/varaverk/`. --- @@ -491,7 +466,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 /boot/config/plugins/varaverk/Rsync/rsync.sh \ /mnt/user/appdata-Fallback/Arrs_Stack --dry-run --log ``` @@ -514,13 +489,13 @@ Expected output (healthy): ### Test the Daily Orchestrator ```bash -bash /mnt/user/appdata/Varaverk/Orchestrators/daily_sync_maintenance.sh --dry-run +bash /boot/config/plugins/varaverk/Orchestrators/daily_sync_maintenance.sh --dry-run ``` ### Check Configuration Resolution ```bash -bash /mnt/user/appdata/Varaverk/Rsync/rsync.sh \ +bash /boot/config/plugins/varaverk/Rsync/rsync.sh \ /mnt/user/appdata-Fallback/Arrs_Stack --status ``` @@ -532,10 +507,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 /boot/config/plugins/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 /boot/config/plugins/varaverk/Orchestrators/daily_sync_maintenance.sh --log ``` The scheduled nightly sync will be incremental after the initial push. @@ -584,7 +559,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 /boot/config/plugins/varaverk/Partnership/ssh_setup.sh ``` ### Pre-flight Aborts on Remote Rootfs diff --git a/Tools/fallback_state_reset.sh b/Tools/fallback_state_reset.sh old mode 100644 new mode 100755 index c8465f7..922728a --- a/Tools/fallback_state_reset.sh +++ b/Tools/fallback_state_reset.sh @@ -146,8 +146,8 @@ if pgrep -f "fallback.sh" >/dev/null 2>&1; then FALLBACK_RUNNING=true warn "⚠️ fallback.sh is currently RUNNING" warn "Resetting state mid-cycle may cause incorrect decisions on the next iteration" - warn "Consider stopping fallback.sh first (click Abort in User Scripts)" - warn "Then reset state, then restart fallback.sh" + warn "Consider stopping fallback.sh first: kill \$(pgrep -f fallback.sh)" + warn "Then reset state, then restart: bash Fallback/fallback.sh &" echo "" warn "If you are sure you want to proceed anyway, confirm below" else diff --git a/unRAID_Essentials/Manual-Unraid_Essentials.md b/unRAID_Essentials/Manual-Unraid_Essentials.md index 373bb26..820f40c 100644 --- a/unRAID_Essentials/Manual-Unraid_Essentials.md +++ b/unRAID_Essentials/Manual-Unraid_Essentials.md @@ -62,7 +62,7 @@ ARRAY_START_SCRIPTS=( "ramdisk_setup.sh" # (from Transcodes/) before Emby starts ... ) -# Watchdogs are NOT in ARRAY_START_SCRIPTS — they run every minute via +# Watchdogs are NOT in ARRAY_START_SCRIPTS — they run every 15 minutes via # Orchestrators/watchdog_orchestrator.sh (separate cron entry). ```