feat: slskd reconnect guard in downloaders_reset, mass v2 sync
- downloaders_reset: connection check block before slskd API sections; triggers PUT /api/v0/server reconnect if disconnected, polls 60s, gates Stuck Searches and Dead Transfer Records on SLSKD_CONNECTED - Sync all modified/new/deleted files from v2 refactor across Docker_Essentials, Media, Monitors, Partnership, Rsync, Tools, Transcodes, unRAID_Essentials, common.sh, master confs, and new Manual/README docs
This commit is contained in:
@@ -2,52 +2,79 @@
|
||||
# ==============================================================================================
|
||||
# ================================= Docker Weekly Restart ======================================
|
||||
# ==============================================================================================
|
||||
# Restarts all running containers in HOST*_WEEKLY_RESTART_CONTAINERS.
|
||||
# Called by weekly_sync_maintenance.sh via WEEKLY_MAINTENANCE_SCRIPTS every Sunday at 2:30am.
|
||||
# Can also be run manually for ad hoc weekly restarts.
|
||||
#
|
||||
# ── CONTEXT ───────────────────────────────────────────────────────────────────────────────────
|
||||
# weekly_sync_maintenance.sh stops containers before syncing and restarts them after.
|
||||
# This script runs AFTER that restart — targeting a different set of less critical services
|
||||
# that benefit from a weekly restart but don't need to be stopped for the sync itself.
|
||||
# These containers are typically already running when this script executes.
|
||||
# PURPOSE
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Restarts configured containers every Sunday at 2:30am as proactive maintenance.
|
||||
#
|
||||
# ── BEHAVIOUR ─────────────────────────────────────────────────────────────────────────────────
|
||||
# Running containers → docker restart (graceful stop + start)
|
||||
# Stopped containers → left stopped — was down intentionally, do not bring back up
|
||||
# Missing containers → logged and skipped — not treated as fatal
|
||||
# Each action uses RETRY_COUNT + SLEEP from master.conf for retry logic.
|
||||
# Called by weekly_sync_maintenance.sh via WEEKLY_MAINTENANCE_SCRIPTS. Runs after
|
||||
# the sync window has completed and already restarted its own critical containers
|
||||
# (Emby, auth stack). Targets a separate set of less-critical services that benefit
|
||||
# from a weekly clean start but do not need to be stopped for the sync itself.
|
||||
#
|
||||
# The "was running → restart, was stopped → leave stopped" rule is consistent
|
||||
# across the entire ecosystem — container state is always respected.
|
||||
# Same behavioural rules as docker_daily_restart.sh: running → restart,
|
||||
# stopped → leave, missing → skip. Container state is always respected.
|
||||
#
|
||||
# ── SAFEGUARDS ────────────────────────────────────────────────────────────────────────────────
|
||||
# Dependency ordering — containers restart in dependency-safe order using
|
||||
# HOST*_WATCHDOG_DEPENDENCIES from master_host*.conf. Dependencies restart
|
||||
# first with CONTAINER_DELAY before their dependents.
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Restart verification — after each restart, container state is checked after a short
|
||||
# settle period. If the container fails to stay running it is marked as failed and
|
||||
# a notification is sent rather than silently passing.
|
||||
# Dependency Ordering
|
||||
# Containers restart in dependency-safe order using HOST*_WATCHDOG_DEPENDENCIES.
|
||||
# CONTAINER_DELAY seconds between dependency restart and dependent restart.
|
||||
#
|
||||
# Timeout protection — all docker commands are wrapped in a 30 second timeout.
|
||||
# A hung Docker daemon cannot cause this script to hang indefinitely.
|
||||
# Restart Verification
|
||||
# Container state checked after a settle period. A container that crashes
|
||||
# immediately after restart is marked failed with a notification sent.
|
||||
#
|
||||
# ── CONFIGURATION (master_host*.conf) ─────────────────────────────────────────────────────────
|
||||
# HOST*_WEEKLY_RESTART_CONTAINERS — list of containers to restart weekly
|
||||
# HOST*_WATCHDOG_DEPENDENCIES — dependency ordering for restart sequence
|
||||
# Set by detect_hosts() alias → WEEKLY_RESTART_CONTAINERS used by this script
|
||||
# Timeout Protection
|
||||
# All docker commands wrapped in a 30 second timeout. A hung Docker daemon
|
||||
# cannot cause this script to hang indefinitely.
|
||||
#
|
||||
# ── CONFIGURATION (master.conf) ───────────────────────────────────────────────────────────────
|
||||
# RETRY_COUNT — retry attempts before giving up on a container
|
||||
# SLEEP — seconds between retry attempts
|
||||
# CONTAINER_DELAY — seconds to wait between dependency and dependent restart
|
||||
# Lock Acquisition
|
||||
# acquire_lock() prevents concurrent execution.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# CONFIGURATION
|
||||
# ==============================================================================================
|
||||
#
|
||||
# master_host*.conf
|
||||
#
|
||||
# HOST*_WEEKLY_RESTART_CONTAINERS
|
||||
# Containers restarted weekly. Aliased by detect_hosts() →
|
||||
# WEEKLY_RESTART_CONTAINERS
|
||||
#
|
||||
# HOST*_WATCHDOG_DEPENDENCIES
|
||||
# Dependency ordering shared with docker_watchdog.sh. Aliased by
|
||||
# detect_hosts() → WATCHDOG_DEPENDENCIES
|
||||
#
|
||||
# master.conf
|
||||
#
|
||||
# RETRY_COUNT
|
||||
# Retry attempts before giving up on a container
|
||||
#
|
||||
# SLEEP
|
||||
# Seconds between retry attempts
|
||||
#
|
||||
# CONTAINER_DELAY
|
||||
# Seconds to wait after restarting a dependency before starting its dependents
|
||||
#
|
||||
# ==============================================================================================
|
||||
# RUNTIME MODES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# docker_weekly_restart.sh
|
||||
# Restart all containers in WEEKLY_RESTART_CONTAINERS
|
||||
#
|
||||
# docker_weekly_restart.sh --dry-run
|
||||
# Preview which containers would be restarted and which would be skipped
|
||||
#
|
||||
# docker_weekly_restart.sh --status
|
||||
# Show configured restart list, container states, and dependency ordering
|
||||
#
|
||||
# docker_weekly_restart.sh --log
|
||||
# Verbose per-container execution output
|
||||
#
|
||||
# ── USAGE ─────────────────────────────────────────────────────────────────────────────────────
|
||||
# docker_weekly_restart.sh — normal restart
|
||||
# docker_weekly_restart.sh --dry-run — preview without restarting
|
||||
# docker_weekly_restart.sh --log — verbose output
|
||||
# docker_weekly_restart.sh --status — show config and exit
|
||||
# ==============================================================================================
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
Reference in New Issue
Block a user