Bring script headers onto the template and close safeguard gaps
Headers claimed protections the code never had, and several destructive paths had no guard against a collapsed config value.
This commit is contained in:
@@ -29,6 +29,28 @@
|
||||
# Emby's config path is detected from the Docker mount — no hardcoded paths.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# DESIGN PRINCIPLES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Diagnose, Never Repair
|
||||
# The script reports which databases fail integrity_check and stops there. SQLite
|
||||
# "repair" means dumping and rebuilding, which silently discards whatever rows were
|
||||
# corrupt — an outcome nobody should get without deciding to. The remediation steps
|
||||
# are printed instead, for a human to run against a backup.
|
||||
#
|
||||
# Stop Emby Before Reading
|
||||
# integrity_check against a live database gives unreliable answers and can itself
|
||||
# contend with Emby's writes. Emby is stopped for the duration and restarted after,
|
||||
# so the check runs against a quiescent file.
|
||||
#
|
||||
# Always Restart, Even on Failure
|
||||
# Emby is brought back up regardless of what the check found, and an EXIT trap armed
|
||||
# before it is stopped restores it even if this script dies partway through. It is
|
||||
# disarmed only once the normal restart has run. Leaving the media server down because
|
||||
# a diagnostic reported a problem turns an investigation into an outage — and the
|
||||
# original running state is honoured, so an Emby that was already stopped stays stopped.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user