Add full banner headers to all scripts across the codebase
Every script now has the established header format: PURPOSE with ─────── separator, OPERATIONAL MODEL, DESIGN PRINCIPLES, OPERATIONAL SAFEGUARDS, CONFIGURATION, and RUNTIME MODES — structured with full ====== banner sections throughout. Orchestrators converted from compact ── inline format to full banners. Stale emby-fallback and dirty sync references removed from Plugin/user_script_plug-in.sh.
This commit is contained in:
+41
-31
@@ -2,42 +2,52 @@
|
||||
# ==============================================================================================
|
||||
# ================================= Unraid Platform Adapter ====================================
|
||||
# ==============================================================================================
|
||||
# Sourced by load_config.sh when PLATFORM=unraid.
|
||||
# Provides the platform_*() API — bash scripts call these instead of OS-specific commands.
|
||||
#
|
||||
# ── API CONTRACT ──────────────────────────────────────────────────────────────────────────────
|
||||
# Every function returns 0 on success / 1 on failure unless noted.
|
||||
# Functions that produce output write to stdout; callers capture with $().
|
||||
# No function calls exit — callers decide what failure means for their flow.
|
||||
# PURPOSE
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Platform abstraction layer for Unraid. Sourced by load_config.sh when
|
||||
# PLATFORM=unraid. Scripts call platform_*() functions instead of OS-specific
|
||||
# commands — the adapter isolates all OS-dependent logic in one place.
|
||||
#
|
||||
# ── ADDING A PLATFORM ─────────────────────────────────────────────────────────────────────────
|
||||
# Create Plugin/truenas/adapter.sh (or ubuntu/adapter.sh) implementing the same function names.
|
||||
# load_config.sh sources Plugin/$PLATFORM/adapter.sh — no other changes needed.
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL MODEL
|
||||
# ==============================================================================================
|
||||
#
|
||||
# ── FUNCTIONS ─────────────────────────────────────────────────────────────────────────────────
|
||||
# platform_require_cmd — verify a platform command exists and is executable
|
||||
# platform_storage_healthy — array mounted and shfs active on /mnt/user
|
||||
# platform_disk_states_path — path to the platform disk state file
|
||||
# platform_get_disk_states — raw disk state content from platform
|
||||
# platform_get_temp_thresholds — disk warn/crit °C from platform config
|
||||
# API CONTRACT
|
||||
# Every function returns 0 on success / 1 on failure unless noted.
|
||||
# Functions that produce output write to stdout; callers capture with $().
|
||||
# No function calls exit — callers decide what failure means for their flow.
|
||||
#
|
||||
# ADDING A PLATFORM
|
||||
# Create Plugin/truenas/adapter.sh (or ubuntu/adapter.sh) implementing the
|
||||
# same function names. load_config.sh sources Plugin/$PLATFORM/adapter.sh —
|
||||
# no other changes needed anywhere in the codebase.
|
||||
#
|
||||
# FUNCTIONS
|
||||
# platform_require_cmd — verify a platform command exists and is executable
|
||||
# platform_storage_healthy — array mounted and shfs active on /mnt/user
|
||||
# platform_disk_states_path — path to the platform disk state file
|
||||
# platform_get_disk_states — raw disk state content from platform
|
||||
# platform_get_temp_thresholds — disk warn/crit °C from platform config
|
||||
# platform_is_maintenance_running — parity check/sync in progress
|
||||
# platform_is_service_enabled — docker or libvirt enabled in boot config
|
||||
# platform_restart_service — restart a named service via rc.d
|
||||
# platform_stop_service — stop a named service via rc.d
|
||||
# platform_is_service_running — check if a named service process is alive
|
||||
# platform_is_mover_running — unRAID mover process check
|
||||
# platform_stop_user_scripts — kill all user.scripts background processes
|
||||
# platform_send_os_notification — native unRAID notify (dynamix)
|
||||
# platform_storage_path — root path for user shares/storage (e.g. /mnt/user)
|
||||
# platform_webui_install_path — where the platform serves the WebGUI plugin files from
|
||||
# platform_is_service_enabled — docker or libvirt enabled in boot config
|
||||
# platform_restart_service — restart a named service via rc.d
|
||||
# platform_stop_service — stop a named service via rc.d
|
||||
# platform_is_service_running — check if a named service process is alive
|
||||
# platform_is_mover_running — unRAID mover process check
|
||||
# platform_stop_user_scripts — kill all user.scripts background processes
|
||||
# platform_send_os_notification — native unRAID notify (dynamix)
|
||||
# platform_storage_path — root path for user shares/storage (e.g. /mnt/user)
|
||||
# platform_webui_install_path — where the platform serves the WebGUI plugin files from
|
||||
# platform_scripts_dir_probe_cmd — shell command to run on a remote to discover its SCRIPTS_DIR
|
||||
# platform_get_templates_dir — path to Unraid CA docker templates-user directory
|
||||
# platform_setup_db_path — path to the persistent Varaverk setup/wizard state database
|
||||
# platform_get_os_version — local OS version string (e.g. "7.2.3")
|
||||
# platform_os_version_probe_cmd — shell command to run on a remote to retrieve its OS version
|
||||
# platform_rebuild_container — rebuild a container from its stored XML template
|
||||
# platform_push_conf — push master.conf to all listed hosts via WebGUI PHP
|
||||
# platform_push_setup_state — push wizard setup state to WebGUI PHP
|
||||
# platform_get_templates_dir — path to Unraid CA docker templates-user directory
|
||||
# platform_setup_db_path — path to the persistent Varaverk setup/wizard state database
|
||||
# platform_get_os_version — local OS version string (e.g. "7.2.3")
|
||||
# platform_os_version_probe_cmd — shell command to run on a remote to retrieve its OS version
|
||||
# platform_rebuild_container — rebuild a container from its stored XML template
|
||||
# platform_push_conf — push master.conf to all listed hosts via WebGUI PHP
|
||||
# platform_push_setup_state — push wizard setup state to WebGUI PHP
|
||||
#
|
||||
# ==============================================================================================
|
||||
|
||||
# ──────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user