Commit Graph
646 Commits
Author SHA1 Message Date
Gmer4Lfe f2a1a930dd Update GPU transform for --gpus "device=UUID" style; keep --runtime=nvidia fallback 2026-06-14 22:07:32 -04:00
Gmer4Lfe 7da9018378 Auto-detect remote GPU and rewrite XML config on deploy — NVIDIA/Intel/AMD/none 2026-06-14 21:56:42 -04:00
Gmer4Lfe 978a5865a7 Add webhook setup, media seed, and listener start to onboarding (steps 9b-9d) 2026-06-14 21:40:25 -04:00
Gmer4Lfe 5d16b902cc Extend download webhook to all grabs, not just upgrades; add DOWNLOAD_WEBHOOK_ENABLED toggle 2026-06-14 21:34:54 -04:00
Gmer4Lfe 554822fc6a Exclude named profiles from merge auto-promote; add RSYNC_MERGE_ENABLED toggle 2026-06-14 21:34:49 -04:00
Gmer4Lfe 11f3492d9d Add arr upgrade webhook listener and setup — closes propagation window without manual arr config 2026-06-14 18:33:33 -04:00
Gmer4Lfe 38916f8375 Add upgrade webhook — close propagation window on arr quality upgrades 2026-06-14 16:55:26 -04:00
Gmer4Lfe 3c303210a3 Add --merge-run to rsync and --force to arr_sync for authoritative node compliance 2026-06-14 15:51:28 -04:00
Gmer4Lfe 5a7d5b5005 Add share_setup.sh — create missing mirror shares during onboarding (pool-aware, idempotent) 2026-06-14 14:53:51 -04:00
Gmer4Lfe 3c880b5bda Add --seed flag to rsync.sh to skip empty-remote-share guard on first push 2026-06-14 14:39:23 -04:00
Gmer4Lfe 6525b957c6 Sync template: add auth stack health URL examples and HOSTN_STORAGE_PATH 2026-06-14 14:22:40 -04:00
Gmer4Lfe 39498b71d0 Sync template with conf: WEEKLY_CONTAINER_UPDATES + MONTHLY_REMAINING_UPDATES 2026-06-14 13:55:43 -04:00
Gmer4Lfe e8608a97b7 document current edit-and-push workflow and post-release dev/prod plan in CLAUDE.md 2026-06-14 13:30:36 -04:00
Gmer4Lfe 373388a77b remove dev folder reference from CLAUDE.md — folder deleted 2026-06-14 13:25:41 -04:00
Gmer4Lfe 6153283de4 move conf templates and conf_populate to Deployment/; add rogue-prevention rules to CLAUDE.md 2026-06-14 13:18:08 -04:00
Gmer4Lfe 722e688783 remove stale dev artifacts; rename dev_install.sh to plugin_setup.sh 2026-06-14 13:08:14 -04:00
Gmer4Lfe 39b8e47ff5 remove .claude/settings.json from tracking — covered by gitignore 2026-06-14 12:51:18 -04:00
Gmer4Lfe 53d76f08c1 default STORAGE_MODE_INTERNAL to false in template — Claude data belongs in appdata not in repo 2026-06-14 12:49:18 -04:00
Gmer4Lfe af76900aa6 untrack claude-bin and claude-data directories; add to gitignore 2026-06-14 12:41:53 -04:00
Gmer4Lfe 3964f6fb46 audit echo vs log across all scripts — outcomes always visible, verbose for per-item loops 2026-06-14 12:40:15 -04:00
Gmer4Lfe 4c37ab16fd Fix slskd connection check silent on success 2026-06-14 11:38:16 -04:00
Gmer4Lfe 08be751d23 Show active HLS segment count in transcode card
Live TV and Direct Stream sessions never appear in the transcoding
session list but do write segments to the ramdisk. Card now shows
the active segment count so the ramdisk usage is explained.
2026-06-14 11:31:51 -04:00
Gmer4Lfe df18657183 Fix transcode session detection for Live TV and Direct Stream
HLS segments are written atomically so lsof never sees them as open.
Cleanup now shows "Active" count (too-young files) which correctly
reflects Live TV / Direct Stream segments. Manager session count now
counts flat file prefixes in addition to subdirs.
2026-06-14 11:24:21 -04:00
Gmer4Lfe a2bcd58f78 Add --weekly mode to docker_update.sh for WEEKLY_RESTART_CONTAINERS
Weekly now has the same update→restart pattern as daily. Remainder
excludes weekly containers since they're now owned by this new mode.
2026-06-14 11:13:23 -04:00
Gmer4Lfe 55f8842dbd Move remainder container updates from weekly to monthly
Daily updates daily containers, weekly updates its sync-window containers,
monthly now handles everything else via MONTHLY_MAINTENANCE_SCRIPTS.
2026-06-14 11:07:18 -04:00
Gmer4Lfe bfc3cbe204 Include WEEKLY_RESTART_CONTAINERS in remainder updates
docker_weekly_restart.sh restarts them but never pulls images — remainder
is the only update path they have.
2026-06-14 11:03:26 -04:00
Gmer4Lfe a5292c4bb7 Document which orchestrator calls each docker_update.sh mode 2026-06-14 10:59:48 -04:00
Gmer4Lfe fdef61cc25 Fix container updates: rebuild on new image, consolidate update scripts
Weekly sync window was pulling images but using docker start after rsync,
which ignores the new digest. Containers in the emby/critical-data profiles
(Emby, Mariadb, Redis) never actually landed on updated images.

docker_update_remaining.sh merged into docker_update.sh --remainder, which
already had better exclusion logic. Added WEEKLY_REMAINING_UPDATES toggle
and WEEKLY_RESTART_CONTAINERS exclusion to remainder mode.

Onboard now runs docker_network_connect.sh on mirror before deploying stacks.
2026-06-14 10:58:19 -04:00
Gmer4Lfe ba3eed39e3 Sync READMEs and manuals to current script headers
Fix discrepancies found by auditing docs against headers:
- stability_watchdog.sh: wrong variable name (STRIKES → STRIKE_LIMIT) and wrong default (2hr → 12hr) in header
- Watchdogs manual: REBOOT_WINDOW_HRS example value was 2, should be 12
- Transcodes README: transcode_cleanup/manager table said "Every 3 min", should be "Every 7 minutes"
- Tools manual: fallback_state_reset.sh still marked "not yet built" — rewrite section to reflect current script
- Tools manual: claude_startup --setup flag doesn't exist; modes were inverted — fix and add --launch
- Tools README + manual: add docker_prune_images.sh (existed but undocumented)
- Tools manual: add play_state_sync.sh --full to flag reference
- Orchestrators README: arrs_failed_stalled_recovery runs via intermediate_sync (every 4hr), not standalone every 6hr
- Plugin README: add build.sh to scripts table
- Partnership README + manual: add partnership_transfer.sh and onboard_cancel.sh to script tables and flag reference
2026-06-14 02:01:27 -04:00
Gmer4Lfe 420e13a746 Resolve bash variable references in vv_conf_vars()
PHP reads master.conf values like STATE_DIR="${SCRIPTS_DIR}/State_Files"
literally — the ${SCRIPTS_DIR} token is never expanded, so any PHP code
using the returned STATE_DIR value got an invalid path. Two-pass resolution:
SCRIPTS_DIR first (from PHP constant), then remaining ${VAR} tokens using
the now-resolved var set (covers DATA_DIR-based paths like ARR_SYNC_BLOCKLIST).
2026-06-14 01:46:51 -04:00
Gmer4Lfe 181114aed5 Header/code audit fixes across all core scripts
Behavior fixes:
- docker_daily_restart.sh: implement RESTART_VERIFY_WAIT sleep before
  verify_running() — variable was logged as config but never applied
- cert_monitor.sh: --log now shows expiry date and days remaining for
  healthy domains in the per-domain summary; problems always show details

Header corrections:
- downloaders_reset.sh: fix frequency contradiction (15 min → 30 min)
- lidarr_cleanup.sh: Emby scan triggers on actual deletions, not every run
- ssh_setup.sh: document --local-only flag in USAGE section
- zfs_memory_snapshot.sh: clarify dry-run skips log write in PURPOSE
- ramdisk_stop.sh / ramdisk_setup.sh: document TRANSCODE_STATE_FILE var
- smart_long_test.sh: remove SMART_TEMP_WARN/CRIT — not used in code
2026-06-14 01:40:35 -04:00
Gmer4Lfe b4d6866f40 Polish before first GitHub push: consistent adapter usage and naming
stability_watchdog.sh mover check now uses platform_is_mover_running()
instead of raw pgrep, matching server_reboot.sh.

check_unraid_version_parity() renamed to check_os_version_parity() —
the function internals were already platform-neutral after the adapter
refactor; the name was the last Unraid artifact.
2026-06-14 01:30:16 -04:00
Gmer4Lfe ee5a07be1c Remove remaining OS-specific hardcodes from core scripts
OS version reads now go through platform_get_os_version() and
platform_os_version_probe_cmd() instead of grepping /etc/unraid-version directly.

STATE_DIR fallbacks to /boot/config removed — STATE_DIR is always set by
load_config.sh and the fallback encoded a platform-specific path.

Setup DB path references use platform_setup_db_path() instead of the
VARAVERK_SETUP_FILE/-/boot/config compound fallback.

DOCKER_APPDATA_BASE default removed from arr_sync.sh — the adapter sets it.
2026-06-14 01:22:02 -04:00
Gmer4Lfe 3c900ae5c1 Resolve remote storage path from host*.conf for true cross-platform SSH support
detect_hosts() now sets REMOTE_STORAGE_PATH from HOST*_STORAGE_PATH in the
remote's conf instead of calling platform_storage_path() locally. SSH commands
that check the remote's storage (check_remote_array, check_remote_disks,
check_both_healthy) use $REMOTE_STORAGE_PATH so they work correctly when the
remote is a different platform with a different storage root.
2026-06-14 01:09:53 -04:00
Gmer4Lfe 27bfc21cb0 Platform-agnostic refactor: eliminate OS-specific hardcodes from core scripts
All bash scripts are now platform-neutral. Unraid-specific paths, commands,
and service checks moved to Plugin/unraid/adapter.sh. Core scripts call
platform_*() functions exclusively — no direct OS paths in runtime logic.

New adapter functions: platform_storage_path, platform_webui_install_path,
platform_scripts_dir_probe_cmd, platform_setup_db_path, platform_storage_healthy,
platform_is_service_enabled, platform_get_temp_thresholds, platform_disk_states_path,
platform_rebuild_container, platform_push_conf, platform_push_setup_state,
platform_get_templates_dir, platform_send_os_notification.

Partnership services stack (Emby/Jellyfin/Seerr/SeerrFin) added as third
onboarding stack alongside auth and arr stacks.
2026-06-14 00:59:19 -04:00
Gmer4Lfe fd1c4c7e3a Add CONF_SYNC_ENABLED to master.conf.template so nightly upgrade doesn't strip it 2026-06-13 13:30:40 -04:00
Gmer4Lfe ba1259c05c Add auth stack conf vars and storage mode selection to setup wizard
host.conf.template: add AUTH STACK section (NPM/lldap/Authelia) so
conf_upgrade.sh stops stripping those keys from host*.conf at 1am.

setup wizard: storage mode selector auto-detects USB vs NVMe at first
run; user can override; triggers storage_migrate.sh when mode differs
from current SCRIPTS_DIR location.

claude_startup.sh: reads HOST*_STORAGE_MODE_INTERNAL to pick internal
or appdata path rather than always requiring array to be mounted.
2026-06-13 13:05:46 -04:00
Gmer4Lfe 60ff658181 Fix conf_upgrade template naming bugs that caused false ADDED/REMOVED on every nightly pull
- REMOTE_ID_TIER*_DELAY renamed to HOSTN_TIER*_DELAY — these are own-host outage timers
- HOSTN_RADARR_MOVIE_ROOT → HOSTN_RADARR_MOVIES_ROOT (matches common.sh)
- HOSTN_SYS_WATCHDOG_CHECK_DOCKER → CHECK_DOCKER_DAEMON, CHECK_TEMP → CHECK_CPU_TEMP
- Add REMOTE_ID substitution to the sed in git_pull_execute.sh so COVERS_REMOTE_ID
  resolves to the actual remote host (e.g. FALLBACK_HOST1_COVERS_HOST2_TIER1)
- Add HOSTN_PARTNERSHIP_REPLACE_CONTAINERS, HOSTN_PARTNERSHIP_ARR_REPLACE_CONTAINERS,
  and HOSTN_WATCHDOG_CONTAINER_API_CHECKS to template so they aren't removed each pull
2026-06-13 10:22:02 -04:00
Gmer4Lfe 1bc76f8490 Align host template to unified section structure
Section order now matches master.conf: IDENTITY → PARTNERSHIP → RSYNC →
FALLBACK → DOCKER → MEDIA → ARR STACK → TRANSCODES → MONITORS →
RESOURCE MANAGER → SYSTEM WATCHDOG. Extracted PARTNERSHIP from IDENTITY
into its own top-level section. PERSONAL SHARES moved to sit directly
after DAILY SYNC SHARES. NIC var moved to top of SYSTEM WATCHDOG block.
2026-06-12 22:09:54 -04:00
Gmer4Lfe f036fbfe4a Sync master.conf.template schema to match live master.conf
STATE_DIR introduced, DATA_DIR path updated to flash, all state files
migrated from /tmp and /boot/config root to $STATE_DIR. TRANSCODE_STATE_FILE
and DOCKER_WATCHDOG_FAILED_FILE added; SYS_WATCHDOG_FAILED_FILE renamed to
DOCKER_WATCHDOG_FAILED_FILE to reflect what it actually tracks.
2026-06-12 21:55:15 -04:00
Gmer4Lfe 1f766fef31 Sync host.conf.template schema to match host1.conf
Added HOSTN_PERSONAL_SHARES, HOSTN_TMDB_API_KEY, and 8 missing system
watchdog check toggles (KERNEL_OOPS, BOOT, OOM, ARC, CONTAINERS, MDSTAT,
NETWORK, SSHD). Reordered watchdog checks to reflect tier structure from
host1.conf. Remaining template/live diffs are intentional renames
(CPU_TEMP→TEMP, DOCKER_DAEMON→DOCKER, MOVIES_ROOT→MOVIE_ROOT, TIER*_DELAY→REMOTE_ID).
2026-06-12 21:54:18 -04:00
Gmer4Lfe f10f09eeb1 Bug fixes, arr cleanup API-driven scan, shared JS formatters
Bug fixes:
- fallback.sh: escape sed metacharacters (\ & |) in state_set values
- common.sh: parse PID from lock file content correctly (handles pid:metadata format)
- unraid_api_key_renew.sh: fix path depth (../../../) and sync registry key to conf when stale
- stop.php: only clear pid/status if process is actually dead — D-state survives SIGKILL
- array_started.sh: check ARRAY_START_SCRIPTS empty before printing launch header

Arr cleanup:
- radarr_cleanup.sh / sonarr_cleanup.sh: fetch root folders from arr API instead of
  reverse-looking up the path map — handles multi-root-folder setups correctly

UI:
- varaverk.js: extract shared formatters (_relTime, _fmtBytes, _sz, _uptime, _gb, _tb, _n)
- arrs.php / partnership.php: use shared formatters, remove duplicates
- arrs.php / fallback.php: show error message on fetch failure instead of silent empty
- docker.php: disable rename input during request, restore original value on failure
- setup.php: abort controller timeout on detect fetch
- partnership.php: remove Re-run Phase 2 button opacity dimming
2026-06-12 21:41:11 -04:00
Gmer4Lfe 3937d5e33b Consolidate conf templates into Configurations/ — remove stale Deployment/conf_templates/
Deployment/conf_templates/ had two stale files: host.conf.template was a copy of host1.conf
(not a HOSTN template), and master.conf had hardcoded hostnames and an old appdata DATA_DIR path.
The correct templates already exist in Configurations/ (master.conf.template, host.conf.template).

Updated varaverk.plg and git_pull_execute.sh to read from Configurations/ directly.
Removed TMPL_DIR variable from git_pull_execute.sh — CONF_DIR covers both.
2026-06-12 21:35:58 -04:00
Gmer4Lfe 129e8ae14a Fix Emby HTTP 500 on PlayedItems — convert DatePlayed to yyyyMMddHHmmss
Emby's API spec requires DatePlayed as yyyyMMddHHmmss; sending ISO 8601 caused 500 on every mark-played call.
2026-06-11 19:22:51 -04:00
Gmer4Lfe ca0d17ec2a All rsync flags re-enabled — HOST2 rebuild complete 2026-06-07 10:12:20 -04:00
Gmer4Lfe 30e7c2f6b0 Detect containers running behind already-pulled images
OLD_ID vs NEW_ID only caught updates landed during this run. If an image
was pulled externally (Unraid UI), the container stayed on the old image
while :latest moved on — this run saw nothing to do. Now also compare
the container's current image ID against :latest and rebuild if behind.
2026-06-07 09:57:00 -04:00
Gmer4Lfe 819f5e6450 Remove old images by ID after container updates, not just dangling prune
Tagged images are never caught by docker image prune -f. Collect OLD_IDs
during the pull loop and explicitly rmi them after rebuilds complete.
2026-06-07 09:54:42 -04:00
Gmer4Lfe 1e54752478 Fix digest falsely counting = style state entries as system watchdog strikes
grep -v ':0$' was picking up kernel_oops_count=00, mdstat_errors=0, and
watchdog_cycle as active strikes. Restrict to : separator lines only.
2026-06-07 09:39:16 -04:00
Gmer4Lfe 80b1ee4f0d Fix rsync wrapper hanging forever after sync completes
exec 1>&- closed stdout but left stderr holding the tee pipe open,
so tee never got EOF and wait blocked indefinitely — keeping the
process alive and the locks held until manually killed.
2026-06-07 09:27:38 -04:00
Gmer4Lfe af313352c0 arr_sync: enforce monitored on every run — bulk re-monitor unmonitored items before sync 2026-06-06 18:35:41 -04:00