Platform adapter: rename System_Essentials, add Plugin/unraid/adapter.sh, wire call sites

- Rename unRAID_Essentials/ → System_Essentials/ (git detects as rename)
- Add Plugin/unraid/adapter.sh: 13 platform_*() functions providing OS-agnostic API
  for storage health, service management, mover, user scripts, notifications,
  disk temps, and platform command validation
- Update load_config.sh: detect PLATFORM (unraid/truenas/unknown), export SCRIPTS_DIR,
  auto-source Plugin/$PLATFORM/adapter.sh after common.sh
- Wire all call sites: replace direct rc.d, pgrep/pkill, var.ini, dynamix.cfg,
  disks.ini, and validate_unraid_cmd calls with platform_*() functions across
  watchdogs, orchestrators, and System_Essentials scripts
- Update all documentation: rename refs, update webgui escalation logic,
  add platform adapter section to Plugin README, update main README with
  portability vision and corrected self-healing stack description
This commit is contained in:
Gmer4Lfe
2026-06-04 18:14:34 -04:00
parent de50a01ab2
commit 369a9e6c19
73 changed files with 522 additions and 228 deletions
+20 -20
View File
@@ -551,9 +551,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 /boot/config/plugins/varaverk/unRAID_Essentials/rsync_stop.sh --status
# bash /boot/config/plugins/varaverk/unRAID_Essentials/rsync_stop.sh
# bash /boot/config/plugins/varaverk/unRAID_Essentials/rsync_stop.sh --full-stop
# bash /boot/config/plugins/varaverk/System_Essentials/rsync_stop.sh --status
# bash /boot/config/plugins/varaverk/System_Essentials/rsync_stop.sh
# bash /boot/config/plugins/varaverk/System_Essentials/rsync_stop.sh --full-stop
# ──────────────────────────────────────────────────────────────────────────────────────────────
@@ -793,8 +793,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 /boot/config/plugins/varaverk/unRAID_Essentials/inotify_tuning.sh --status
# bash /boot/config/plugins/varaverk/unRAID_Essentials/inotify_tuning.sh
# bash /boot/config/plugins/varaverk/System_Essentials/inotify_tuning.sh --status
# bash /boot/config/plugins/varaverk/System_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.
@@ -802,8 +802,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 /boot/config/plugins/varaverk/unRAID_Essentials/php_fpm_max_children.sh --status
# bash /boot/config/plugins/varaverk/unRAID_Essentials/php_fpm_max_children.sh
# bash /boot/config/plugins/varaverk/System_Essentials/php_fpm_max_children.sh --status
# bash /boot/config/plugins/varaverk/System_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.
@@ -811,8 +811,8 @@
# Real events (mount failures, permission errors) are invisible in that noise.
# Idempotent: compares expected filter content exactly — only writes when changed.
#
# bash /boot/config/plugins/varaverk/unRAID_Essentials/docker_syslog_filter.sh --status
# bash /boot/config/plugins/varaverk/unRAID_Essentials/docker_syslog_filter.sh
# bash /boot/config/plugins/varaverk/System_Essentials/docker_syslog_filter.sh --status
# bash /boot/config/plugins/varaverk/System_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.
@@ -823,17 +823,17 @@
# 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 /boot/config/plugins/varaverk/unRAID_Essentials/clear_logs.sh --dry-run
# bash /boot/config/plugins/varaverk/unRAID_Essentials/clear_logs.sh --status
# bash /boot/config/plugins/varaverk/System_Essentials/clear_logs.sh --dry-run
# bash /boot/config/plugins/varaverk/System_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 /boot/config/plugins/varaverk/unRAID_Essentials/mover_stop.sh --status
# bash /boot/config/plugins/varaverk/unRAID_Essentials/mover_stop.sh --dry-run
# bash /boot/config/plugins/varaverk/unRAID_Essentials/mover_stop.sh
# bash /boot/config/plugins/varaverk/System_Essentials/mover_stop.sh --status
# bash /boot/config/plugins/varaverk/System_Essentials/mover_stop.sh --dry-run
# bash /boot/config/plugins/varaverk/System_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.
@@ -841,9 +841,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 /boot/config/plugins/varaverk/unRAID_Essentials/server_reboot.sh --dry-run
# bash /boot/config/plugins/varaverk/unRAID_Essentials/server_reboot.sh --status
# bash /boot/config/plugins/varaverk/unRAID_Essentials/server_reboot.sh
# bash /boot/config/plugins/varaverk/System_Essentials/server_reboot.sh --dry-run
# bash /boot/config/plugins/varaverk/System_Essentials/server_reboot.sh --status
# bash /boot/config/plugins/varaverk/System_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.
@@ -851,9 +851,9 @@
# 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 /boot/config/plugins/varaverk/unRAID_Essentials/user_scripts_stop.sh --status
# bash /boot/config/plugins/varaverk/unRAID_Essentials/user_scripts_stop.sh --dry-run
# bash /boot/config/plugins/varaverk/unRAID_Essentials/user_scripts_stop.sh
# bash /boot/config/plugins/varaverk/System_Essentials/user_scripts_stop.sh --status
# bash /boot/config/plugins/varaverk/System_Essentials/user_scripts_stop.sh --dry-run
# bash /boot/config/plugins/varaverk/System_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.