Commit Graph
351 Commits
Author SHA1 Message Date
Gmer4Lfe fc01268c12 Scheduler: single Save Schedule button at bottom saves all cron entries at once 2026-05-23 18:06:26 -04:00
Gmer4Lfe 477b2041a7 Scheduler: 50/50 split, taller log, auto-load most recent log on page load 2026-05-23 18:02:40 -04:00
Gmer4Lfe 706ef2dd72 Scheduler: two-panel responsive layout with running indicator
Scripts list on left, persistent log panel on right. On screens ≤880px
falls back to stacked single-column. Right panel stays open until page
refresh or another selection. Running dot pulses green on the job row
and in the log header while script executes, clears when log goes stale.
2026-05-23 17:59:51 -04:00
Gmer4Lfe d0b842a489 Add Dry Run button; fix CSRF token on all POST API calls
All fetch() POSTs now send application/x-www-form-urlencoded with the
page-injected csrf_token, satisfying unRAID's auto_prepend CSRF check.
All PHP API handlers switched from php://input JSON to $_POST.

Also adds Dry Run button (orange, between Run and Log) that sets
DRY_RUN=1 in the script environment before executing.
2026-05-23 17:50:47 -04:00
Gmer4Lfe 131d9093b0 Scheduler: Run button, single card-level Save, remove per-row Save
- Run button (blue) fires script immediately, opens log panel;
  stamps log with manual run timestamp before exec
- Save moved to card footer — one button saves all cron expressions
  for the orchestrator and all its children at once
- Toggle still auto-saves immediately on flip (enable/disable is instant)
- Removed onblur from cron inputs — cron only saves on explicit Save
- api/run.php: validates id, appends timestamp, execs script in background
2026-05-23 17:22:52 -04:00
Gmer4Lfe 6050816fe4 Scheduler: card layout, per-job logs, live log panel
- Per-job log files replace single jobs.log: each script writes to
  /var/log/varaverk/<Category>/<script>.log mirroring the job ID
- api/log.php: serves last 200 lines of a job's log file with mtime
  timestamp; supports POST ?clear=1 to truncate
- Scheduler page redesigned as full-width cards (one per orchestrator)
  with Save + Log buttons; Log toggles an inline panel that polls
  every 3 seconds and auto-scrolls — same pattern as unRAID User Scripts
- Children shown under Advanced with identical per-job log panels
- CSS: vv-sched-card, vv-log-panel, vv-log-pre, vv-btn-sm
2026-05-23 17:17:09 -04:00
Gmer4Lfe 1b365d4fb7 Fix conf array parser stopping early at ) in comments
Non-greedy (.*?) stopped at the first ) found, which could be inside
a comment like '# gracefully stop fallback (not caught by ...)'.
Anchoring the closing paren to start-of-line (^\s*\)) ensures it only
matches the array's actual closing paren, not ) inside comment text.
2026-05-23 17:12:58 -04:00
Gmer4Lfe 0197eab7a5 Read scheduler children from master.conf arrays
Orchestrators using dynamic dispatch (array_started, watchdog_orchestrator,
daily/weekly/etc maintenance) iterate \${VARNAME_SCRIPTS[@]} arrays defined
in master.conf. The previous regex only caught static hardcoded paths.

Two-strategy approach, merged and deduped:
1. Static: \$VAR/../Category/script.sh and \$VAR/Category/script.sh patterns
2. Dynamic: detect \${VARNAME[@]} references in the orch, parse that array
   from master.conf — handles inline args and skips commented entries

Changes to master.conf arrays are reflected immediately on next page load.
2026-05-23 17:08:52 -04:00
Gmer4Lfe b00918e080 Fix child script detection in scheduler
Previous regex only matched literal bash/source calls with bare paths.
Orchestrators use shell variables like \$SCRIPT_DIR/../Transcodes/script.sh
and \$SCRIPTS_ROOT/Category/script.sh — the old pattern missed all of these.

New regex captures the Category/script.sh portion from either pattern,
requires at least one subdirectory (excludes load_config.sh and root-level
utilities), and validates each candidate against the filesystem.

transcode_management now correctly shows transcode_cleanup and transcode_manager.
Orchestrators using master.conf config arrays for dynamic dispatch still show
no children — correct, as those lists cannot be statically parsed.
2026-05-23 17:04:36 -04:00
Gmer4Lfe f6f3655810 Rebuild cron on boot via disks_mounted event
/etc/cron.d/varaverk is RAM-based and wiped on every reboot. The
disks_mounted event fires early in boot (before Docker) with /boot
already readable, so schedule.json is available to restore the cron
file automatically without any user action.
2026-05-23 16:58:05 -04:00
Gmer4Lfe d3a5af09d1 Create /var/log/varaverk/ on cron rebuild
/var/log/ is RAM-based on unRAID — wiped on reboot. Creating the log
directory in vv_cron_rebuild() ensures it exists before the first cron
job fires, without needing a separate boot script.
2026-05-23 16:54:51 -04:00
Gmer4Lfe 7b7a3a9e9e Fix plugin routing, missing includes, and make SCRIPTS_DIR configurable
- Rename varaverk.page → Varaverk.page: unRAID nginx only routes URLs
  starting with a capital letter (~^/[A-Z].*), lowercase caused 404
- Add require_once config.php to include/scheduler.php and include/docs.php:
  both used SCRIPTS_DIR constant without including the file that defines it
- Replace hardcoded SCRIPTS_DIR with cfg-file-backed setting: reads from
  /boot/config/plugins/varaverk/varaverk.cfg, falls back to default on first run
- Add Plugin Settings card to Config tab with scripts path field
- Add api/settings.php to write the cfg file (validates directory exists)
2026-05-23 16:48:52 -04:00
Gmer4Lfe 4ab3ddbc47 Add Varaverk plugin scaffold (PHP, unRAID native)
Plugin lives in Plugin/ — invisible to User Script Plugin.
dev_install.sh symlinks into /usr/local/emhttp/plugins/varaverk/ for development.

Pages: Monitor (5s poll), Scheduler (orchs + Advanced children, toggle + cron),
Config (raw editor, host-aware file access), Docs (markdown + live $VAR substitution).

API endpoints: monitor.php (JSON), scheduler.php (writes schedule.json + cron.d),
config.php (writes conf files with host permission check).

Includes: config.php (parser, host detection, var map), scheduler.php (job tree,
cron.d rebuild), monitor.php (docker, GPU, resources, fallback, transcode),
docs.php (file tree, var substitution, Parsedown renderer).
2026-05-23 16:19:12 -04:00
Gmer4Lfe 5e4f510a42 Fix stale 15-minute critical sync references — corrected to 30 minutes
critical_sync_maintenance.sh runs every 30 minutes (*/30 cron).
Three references in README.md and Partnership/README-Partnership.md
still said 15 minutes from an earlier schedule.
2026-05-23 15:44:39 -04:00
Gmer4Lfe 59c2372fa1 Fix stale 3-minute transcode timing — corrected to 7 minutes
transcode_management.sh runs every 7 minutes. Six references across
README.md, README-Transcoding.md, Manual-Transcoding.md, transcode_manager.sh,
and transcode_cleanup.sh still said 3 minutes from before the schedule change.
2026-05-23 15:43:14 -04:00
Gmer4Lfe e215db2a57 Warn that VRAM exhaustion masks --gpus fixes
If PaddleOCR (or any GPU sidecar) holds all VRAM, --gpus will still
appear to fail even when configured correctly. Added explicit callout:
check nvidia-smi before concluding the GPU flag is wrong.
2026-05-23 14:30:33 -04:00
Gmer4Lfe c11e85d8be Show full GPU Extra Parameters string everywhere it appears
README-Transcoding now has a dedicated REQUIRED EXTRA PARAMETERS section
with both GPU and non-GPU variants and the Google warning up front.

Manual-Transcoding: two troubleshooting sections that showed mount-only
now show both GPU and non-GPU full strings. NVIDIA section quote style
fixed (--gpus "device=UUID" consistently).
2026-05-23 14:24:41 -04:00
Gmer4Lfe 921e137d95 Add GPU containers section to main README — ignore Google
Every search result shows --runtime=nvidia which conflicts with
bind-propagation=shared on unRAID 7.2.5+ and breaks on container
rebuilds. New prominent section explains the correct --gpus approach,
why the old method fails, and the VRAM starvation cascade.

Item #6 in Surprises updated to reference the new section; arr cleanup
renumbered to #8.
2026-05-23 14:19:56 -04:00
Gmer4Lfe 1381540dab Document GPU setup, --gpus vs --runtime=nvidia, and VRAM starvation
Required Mount section now shows full Extra Parameters for both GPU and
non-GPU containers and explains why --gpus beats --runtime=nvidia at
setup time rather than burying it in Troubleshooting.

New troubleshooting entry documents the GPU memory starvation cascade:
OCR sidecar (PaddleOCR) holds VRAM → Jellyfin hard-fails, Emby falls
back to CPU silently. Emby's NVIDIA startup probe is one-shot — VRAM
must be free before restarting or NVIDIA stays disabled for the session.
Includes correct recovery sequence and Tesseract fallback for EmbyCredits.

README callout updated from two to three non-obvious requirements.
2026-05-23 14:11:00 -04:00
Gmer4Lfe 767e64c072 Add Jellyfin to HOST2 transcode servers
Mirrors HOST1 change — adds HOST2_JELLYFIN vars and registers the container in HOST2_TRANSCODE_SERVERS.
2026-05-23 13:40:55 -04:00
Gmer4Lfe 8e5bd28843 Add Jellyfin to HOST1 transcode servers
Adds HOST1_JELLYFIN vars and registers the container in HOST1_TRANSCODE_SERVERS.
2026-05-23 13:39:26 -04:00
Gmer4Lfe 3b2501d091 docs(transcodes): note unRAID 7.2.5 regression context for NVIDIA conflict 2026-05-23 10:54:51 -04:00
Gmer4Lfe f992804739 docs(transcodes): document NVIDIA_VISIBLE_DEVICES + bind-propagation=shared conflict
--runtime=nvidia + NVIDIA_VISIBLE_DEVICES + bind-propagation=shared causes
"open /proc/self/mountinfo" init failure. Fix: --gpus device=UUID flag instead.
2026-05-23 10:46:58 -04:00
Gmer4Lfe c3fb0d4bd6 docs(manual): remove NerdPack tools section — not required 2026-05-23 10:24:35 -04:00
Gmer4Lfe 2e04821b75 docs: add Manual.md — end-to-end setup guide
Step-by-step deployment guide: prerequisites, Tailscale, git clone,
sparse checkout, master.conf/host*.conf config, SSH keys via ssh_setup.sh,
Arbiter cron table, initial sync, fallback enable, partnership onboard,
verification, and common first-run troubleshooting.

Fixes the broken README-Rsync_Setup.md reference in README.md.
2026-05-23 10:23:27 -04:00
Gmer4Lfe 4c559f7791 fix(log/echo): log → info for section-level status across 4 scripts
lidarr_cleanup, sonarr_cleanup, radarr_cleanup:
  container health result, safety layer 1 pass, import scan queued/complete,
  API query, found N items, in-memory map built, item|tracked count,
  tracked% safety check, first-run baseline, root/orphan-age config,
  empty folder cleanup start/done

cert_monitor:
  domains to check count, warn/crit threshold display

Per-item loop lines (Fetching N/M, Still scanning..., OK per-domain)
remain as log() — verbose only.
2026-05-23 09:58:19 -04:00
Gmer4Lfe b76072a318 fix(lidarr_missing_art): log → info for section-level status lines
Section headers (reachable, counts, summaries) were using log() and
invisible without --log. Per-item detail ([n/N] artist/album, fetched
file names) stays log.
2026-05-23 09:50:58 -04:00
Gmer4Lfe 48374c1640 docs(transcodes): add dirty shutdown recovery to troubleshooting
Documents the known issue where an unclean shutdown leaves the --mount
bind-propagation entry in a broken state that prevents Emby from starting.
Recovery: remove mount → start → wait for load → re-add mount → restart.
2026-05-23 09:47:28 -04:00
Gmer4Lfe 96ff9b8f95 feat(partnership): extract transfer into partnership_transfer.sh
Follows the same extraction pattern as partnership_offboard.sh.
partnership_manager.sh --transfer now exec-forwards to the new script.
Legacy inline block preserved under `if false` for reference.

Fixes in partnership_transfer.sh vs the original inline code:
- WebUI reconfiguration corrected: SSH to new owner (mirror) to set localhost;
  reconfigure_local_webuis() on current server to point to new owner IP
- master.conf remote update uses scp push instead of self-SSH with wrong path
- SSH key uses $SSH_KEY directly (was using undefined {HOST*}_SSH_KEY expansion)
2026-05-23 09:42:39 -04:00
Gmer4Lfe 8f86e9db88 fix(fallback_state_reset): add missing exit 0 at end of script 2026-05-23 09:35:28 -04:00
Gmer4Lfe fda853eed8 fix 9 bugs in partnership offboard flow
partnership_manager.sh:
- fix auto-offboard threshold: × 96 → × 48 (was triggering at 2× configured days)
- fix do_final_sync(): use CRITICAL_SYNC_SHARES if configured; fall back to hardcoded paths
- replace inline --check offboard blocks with background partnership_offboard.sh calls:
  • owner path was missing remote container cleanup (steps 8+9) and blocklist
  • mirror path was missing blocklist, SSH revocation, CRITICAL_RSYNC_ENABLED=false
  • local grace_seconds outside a function (bash error) eliminated with the block removal
  • 6hr Tailscale grace sleep was blocking the cron for the full grace window

partnership_offboard.sh:
- reorder owner path: state write moved from step 5 to step 10 (last) so re-running
  after a mid-offboard crash restarts from scratch instead of exiting as INACTIVE;
  state is now written before the Tailscale grace sleep so --check stops re-triggering
- add FolderView3 remote folder cleanup in step 7 (mirror's fallback folder persisted)
- track step 1+2 outcome with STEP_STOP_OK / STEP_SYNC_OK; summary now reflects actual
  result instead of hardcoding  regardless of dry-run or failure
- update header step list to match new step order
2026-05-23 09:24:34 -04:00
Gmer4Lfe 14a74939e6 audit and clean master.conf, common.sh, and emby sync tools
master.conf:
- reorder ORCHESTRATORS section by run frequency; add missing entries
- remove heartbeat vars (watchdogs no longer run in continuous cycle)
- remove dead REMOTE_DOCKER_RETRY_WAIT and display-only watchdog interval vars
- move INTERMEDIATE_RSYNC_ENABLED into RSYNC two-tier block; reorder by frequency

common.sh:
- add missing info() and success() definitions — both were called throughout but never defined
- update output tier description to list all 5 functions
- fix double-icon in check_local_disk_temps() error/warn calls
- fix smashed curl/ssh command lines in notify_emby_scan() and check_remote_docker_daemon()
- update check_rsync_enabled() comment to include INTERMEDIATE, ordered by frequency

emby_to_radarr_sync.sh / emby_to_sonarr_sync.sh:
- wire up RADARR_EMBY_LIBRARIES / SONARR_EMBY_LIBRARIES; empty array now scans all libraries
2026-05-23 09:09:25 -04:00
Gmer4Lfe ee086f309e rename appdata-Failover→appdata-Fallback in docs; critical sync 15→30min; transcode 3→7min
appdata-Failover → appdata-Fallback:
  All .md files updated — scripts and confs already used appdata-Fallback.
  Share was renamed; docs were the only stale references.

critical_sync_maintenance.sh: */15 → */30, 96/day → 48/day:
  critical_sync_maintenance.sh header, master.conf, host1/2.conf comments,
  Orchestrators README, User Script Plug-in README, Partnership README/manual/script,
  Docker_Essentials README/downloaders_reset.sh, Fallback README,
  weekly_sync_maintenance.sh, user_script_plug-in.sh all updated.

rsync_emby_failover User Script superseded:
  Emby dirty sync was already in HOST1_CRITICAL_SYNC_SHARES — it now runs inside
  critical_sync_maintenance.sh every 30min alongside auth sync and partnership check.
  Section in User Script Plug-in README marked for deletion from plugin.

transcode_management.sh: */3 → */7:
  transcode_management.sh, transcode_manager.sh, transcode_cleanup.sh headers,
  Transcodes README/manual, Orchestrators README, User Script Plug-in README,
  user_script_plug-in.sh all updated.
2026-05-22 22:22:21 -04:00
Gmer4Lfe 2d0c91ea13 fix stale RAM tier vars in stability_watchdog section of Watchdogs manual
Update the Three-Tier Response and RAM Tiers sections to reflect the
resource_watchdog/stability_watchdog split: MEM_WARN_GB/MEM_SHUTDOWN_GB/
MEM_RECOVER_GB moved to RW_RAM_SOFT/MEDIUM/HARD/RECOVER_GB in resource_watchdog;
stability_watchdog now only holds SYS_WATCHDOG_MEM_GB (reboot trigger). Update
required containers reference from SYS_WATCHDOG_REQUIRED_CONTAINERS (removed)
to HOST*_WATCHDOG_REQUIRED_CONTAINERS in host*.conf.
2026-05-22 22:09:13 -04:00
Gmer4Lfe 2fa78a21b6 doc audit — fix stale watchdog vars, fallback_state_reset, add monthly_maintenance and mesh_monitor sections
- Tools/Manual-Tools.md: fallback_state_reset.sh marked not yet built; manual
  workaround added; TOC entry updated; failover→fallback rename throughout
- Watchdogs/Manual-Watchdogs.md: System Watchdog config block updated — remove
  pre-split vars (MEM_WARN_GB, MEM_SHUTDOWN_GB, MEM_GB, MEM_RECOVER_GB,
  SYS_WATCHDOG_MEM_SHUTDOWN_EXCLUDED, SYS_WATCHDOG_REQUIRED_CONTAINERS);
  add SYS_WATCHDOG_MEM_GB (reboot trigger only); fix state file path names
  (watchdog_state.db → container_watchdog_state.db,
  sys_watchdog_state.db → system_watchdog_state.db)
- Orchestrators/README-Orchestrators.md: add monthly_maintenance.sh section
  with two-gate model, configuration reference, and usage examples
- Monitors/README-Monitors.md: add mesh_monitor.sh to both tables and diagram
- Monitors/Manual-Monitors.md: add mesh_monitor.sh section
- README-User_Script_Plug-in.md, Rsync/README-Rsync.md, Rsync/Manual-Rsync.md,
  README.md: emby-failover → emby-fallback (missed from prior batch)
2026-05-22 22:07:46 -04:00
Gmer4Lfe 070013cb4f fix widespread naming errors across all docs — array_started, fallback, FALLBACK_
array_start.sh → array_started.sh (bulk rename — actual file has always been
array_started.sh; docs consistently used the wrong name across 9 files)

failover.sh → fallback.sh (bulk rename — script is Fallback/fallback.sh;
docs used the old name throughout)

FAILOVER_HOST2_RUNS_FOR_HOST1_TIER1 → FALLBACK_HOST2_COVERS_HOST1_TIER1
(README.md — wrong variable name, actual vars use FALLBACK_ prefix and
COVERS_ not RUNS_FOR_)

docker_watchdog.sh attribution: "started by array_started.sh" → "called every
minute by watchdog_orchestrator.sh" (docker_watchdog is not in ARRAY_START_SCRIPTS)

server_reboot.sh shutdown sequence: step 7 "rc.docker stop" → calls
array_stopping.sh (user_scripts, fallback, rsync, mover, docker_container_stop)

Rsync manual ARRAY_START_SCRIPTS list: removed stability_watchdog and
docker_watchdog (now in watchdog_orchestrator); failover → fallback
2026-05-22 21:53:32 -04:00
Gmer4Lfe 8d72fbf0e2 fix Failover→Fallback naming and missing/stale script references
Failover/ was renamed to Fallback/ — all script paths and README links
updated across README.md, Orchestrators README, and User Script Plug-in README.

array_start.sh → array_started.sh in Orchestrators scripts table (wrong name).

fallback_state_reset.sh: script is referenced in User Script Plug-in README
but does not exist in Fallback/. Entry updated to document it as not yet built
and provides the manual workaround (direct state file write).

Note: /mnt/user/appdata-Failover/ share path references left unchanged —
that is the actual unRAID share name on the server, not the script folder.
2026-05-22 21:47:03 -04:00
Gmer4Lfe 8b0ee44b65 fix stale doc references across four files
README.md:
  - folder tree: conf files at root → Configurations/ subfolder
  - folder tree: Failover/ → Fallback/, wrong README name corrected
  - folder tree: add Kernel/ entry (was missing)
  - CONFIGURATION section: note Configurations/ path + sparse checkout

README-User_Script_Plug-in.md:
  - mem_shutdown_active attributed to stability_watchdog → resource_watchdog

unRAID_Essentials/README-Unraid_Essentials.md:
  - webgui_watchdog schedule: "Every 10 min via User Scripts" →
    "Every minute via watchdog_orchestrator → system_watchdog"
  - HOW THE SCRIPTS RELATE: arrow diagram corrected — system_watchdog.sh
    calls storage/webgui/network watchdogs, not the reverse; added
    network_watchdog.sh and stability_watchdog.sh to the flow

Orchestrators/README-Orchestrators.md:
  - continuous daemon example: system_watchdog.sh → fallback.sh
    (system_watchdog is now single-pass, not a daemon)
  - scripts table: add watchdog_orchestrator.sh and monthly_maintenance.sh
    (both were missing)
2026-05-22 21:41:31 -04:00
Gmer4Lfe 8d8a4fd637 update stale media ownership language across all docs
arr_sync.sh bidirectional union replaced the old split-ownership model.
Old: HOST1 owns Movies/TV/Music, HOST2 owns Anime — each arr manages
different shares to avoid conflicts.
New: arr_sync.sh keeps all arr databases in union. Either server can
download to any share at any time. The union is the source of truth.

Auth stack references left intact — HOST1 still owns auth config
(one-way sync to HOST2). Only media library ownership language updated.

Files changed:
  README.md                          — server block + share annotations
  Fallback/README-Fallback.md        — role line + Split Source of Truth section
  Orchestrators/README-Orchestrators — daily sync share comments
  Rsync/Manual-Rsync.md              — DEFAULT_RSYNC_OPTS comment block
  Media/README-Media.md              — HOST AWARENESS section
2026-05-22 21:35:45 -04:00
Gmer4Lfe 29eb722057 update README media model — arr_sync.sh union replaces ownership split
Old model: HOST1 owns Movies/TV/Music, HOST2 owns Anime — each arr
manages different shares to prevent conflicts.

New model: arr_sync.sh syncs all arr databases bidirectionally before
every rsync cycle. Either server can download to any share at any time.
The databases converge (union, not overwrite), then rsync spreads files
additively. Neither server owns a share. The union is the source of truth.

Also updates share name annotations and removes the "read-only mirror"
framing from the share naming section.
2026-05-22 21:30:07 -04:00
Gmer4Lfe d708d04188 add monthly_maintenance.sh — uptime-triggered orchestrator
Two-gate design: server must have ≥30 days uptime AND last run must
be ≥30 days ago. Both gates must pass before any scripts fire. Called
daily at 3am via cron — script self-gates, calling more often is safe.

State file on /boot/config (survives reboots): the interval gate is
independent of uptime. A reboot resets uptime but does not reset when
maintenance last ran — both gates must independently pass.

MONTHLY_MAINTENANCE_SCRIPTS added to master.conf in ORCHESTRATORS
section. zfs_pool_scrub.sh and smart_long_test.sh listed but commented
(neither script exists yet). Also commits mesh_monitor.sh move to
Monitors/ that was staged from prior session.

Supports --force to bypass both gates for manual runs.
2026-05-22 21:23:10 -04:00
Gmer4Lfe d05df84d00 Docs: add network_watchdog to README-Watchdogs and Manual-Watchdogs
README-Watchdogs: tier diagram, folder relationship, script table,
  execution flow, state file table
Manual-Watchdogs: TOC entry, full System/network_watchdog.sh section
  (check sequence, config, usage, troubleshooting), config reference block
2026-05-22 20:54:04 -04:00
Gmer4Lfe 4535804c5d Add System/network_watchdog.sh — services-layer connectivity watchdog
Checks:
  1. Internet reachability (gates all remaining checks)
  2. DDNS sync — public IP vs Cloudflare DNS record, restarts Gmer4Lfe.com container on mismatch
  3. Tailscale status — notify only, no auto-restart
  4. NPM proxy — external curl to https://gmer4lfe.com, 2-strike system before NginxProxyManager restart

Config: master.conf NETWORK_WATCHDOG_* block, host1.conf HOST1_NETWORK_WATCHDOG_* values
Added to SYSTEM_WATCHDOG_SCRIPTS — called by system_watchdog.sh each cycle

Fix: storage_watchdog.sh was calling get_strikes/set_strikes without defining them —
added local definitions (same pattern as docker_watchdog.sh and stability_watchdog.sh)
2026-05-22 20:51:22 -04:00
Gmer4Lfe 13ce8497f3 Update all docs to reflect watchdog restructure
README-Watchdogs.md: new tier diagram, updated script table, execution flow,
  state file table, and folder relationship diagram
Manual-Watchdogs.md: added system_watchdog (thin), System/storage_watchdog,
  System/webgui_watchdog, and stability_watchdog sections; updated TOC and troubleshooting
README.md: updated schedule listing, folder description, daily cycle examples
README-User_Script_Plug-in.md: stability_watchdog references throughout
unRAID_Essentials/README + Manual: stability_watchdog, updated storage path
Monitors/README, Rsync/Manual, Tools/Manual: lock name list updates
2026-05-22 20:26:36 -04:00
Gmer4Lfe cf21efaeea Structural reorganization: watchdog taxonomy + server_reboot integration
Watchdog renames and moves:
  system_watchdog.sh → stability_watchdog.sh (last line of defense — reboots)
  storage_watchdog.sh → Watchdogs/System/storage_watchdog.sh
  webgui_restart.sh → Watchdogs/System/webgui_watchdog.sh (renamed to match folder convention)

New thin orchestrator:
  Watchdogs/system_watchdog.sh — runs SYSTEM_WATCHDOG_SCRIPTS from master.conf
  Sits between docker_watchdog and stability_watchdog in the orchestrator tier chain
  System/ subfolder is the growth seam for future system component watchdogs

master.conf:
  WATCHDOG_ORCHESTRATOR_SCRIPTS updated — storage removed, system_watchdog added as tier
  SYSTEM_WATCHDOG_SCRIPTS array added — storage + webgui

server_reboot.sh:
  Calls array_stopping.sh before VM shutdown for guaranteed safe array stop
  Removed raw rc.docker stop and exit trap — orchestrator owns container shutdown
2026-05-22 20:17:22 -04:00
Gmer4Lfe 670f25fbbd Move .conf files into Configurations/ folder
master.conf, host1.conf, host2.conf relocated from repo root to Configurations/.
load_config.sh updated to source from the new path — no other scripts need changes.

Note: sparse checkout rules on HOST1 and HOST2 need updating to use
Configurations/host1.conf and Configurations/host2.conf respectively.
2026-05-22 19:18:18 -04:00
Gmer4Lfe 9598766aa8 Add Tools/mesh_monitor.sh 2026-05-22 18:56:57 -04:00
Gmer4Lfe 8d00189241 Rename to Varaverk; replace User Scripts → Arbiter in README
README.md: header updated to VARAVERK. All "User Scripts plugin" references
  replaced with "Arbiter". Project name section: "Working name: Arbiter" → "Varaverk".
  Gitea corrected to Tier 1 (was shown as Tier 3, updated to Tier 1 this session).

master.conf: GITEA_REPO_PATH updated FailedProxy → Varaverk org name.

Script internals (user_scripts_stop.sh, script headers, other docs) reference
the /tmp/user.scripts working path which is Arbiter-specific — those will be
updated in a separate pass once Arbiter's working directory is confirmed.
2026-05-22 18:52:34 -04:00
Gmer4Lfe 36190c965a Add Gitea SSH setup script and integrate Gitea into partnership/failover
Partnership/gitea_ssh_setup.sh: generates ed25519 keypair, registers public key
  with Gitea API (POST /api/v1/user/keys), tests SSH connection, writes ~/.ssh/config
  entry. Idempotent — skips steps already done. --force regenerates and re-registers.
  Resolves Gitea endpoint from container IP first, falls back to GITEA_DOMAIN.

common.sh: alias HOST*_GITEA_API_TOKEN → GITEA_API_TOKEN in detect_hosts().
  Add to detect_hosts() doc comment.

master.conf: add GITEA_HTTP_PORT=3000 for API endpoint construction.

host1.conf: add HOST1_GITEA_API_TOKEN (fill in from Gitea Settings → Applications).
  Add my-Gitea.xml to HOST1_PARTNERSHIP_AUTH_STACK — onboard pushes it to HOST2.

host2.conf: add Gitea to FALLBACK_HOST2_COVERS_HOST1_TIER1 — starts immediately
  when HOST1 goes down, making the source of truth reachable independently of
  HOST1's auth stack.
2026-05-22 18:15:25 -04:00
Gmer4Lfe 16e3b7651d Bump ramdisk to 10G; add ramdisk_stop.sh; fix info→log typo in common.sh
host1.conf: HOST1_RAMDISK_SIZE 8G→10G, WARN_GB 6.8→8.5, LOW_GB 5.5→7.
ramdisk_stop.sh: new Tools/ script — redirects symlink to SSD before unmount
  so Emby keeps writing during maintenance, auto-falls back to lazy umount
  when only directory handles are open (no active writes).
common.sh: fix `info` call at line 595 (undefined) → `log`.
Tools docs: added ramdisk_stop.sh to README table, categories, diagram, and Manual.
2026-05-22 17:35:16 -04:00