Watchdogs/ folder + host conf rename
Move all watchdog scripts to a dedicated Watchdogs/ folder: Docker_Essentials/docker_watchdog.sh → Watchdogs/ unRAID_Essentials/system_watchdog.sh → Watchdogs/ unRAID_Essentials/resource_watchdog.sh → Watchdogs/ Orchestrators/watchdog_orchestrator.sh → Watchdogs/ Tools/watchdog_skip_list_manager.sh → Watchdogs/ Rename host config files: master_host1.conf → host1.conf master_host2.conf → host2.conf Update all references across the ecosystem: master.conf: WATCHDOG_ORCHESTRATOR_SCRIPTS paths → Watchdogs/ load_config.sh: host*.conf glob + all comments git_pull_execute.sh: sparse checkout glob + all comments Partnership/ssh_setup.sh: HOST_CONF path construction user_script_plug-in.sh: all script paths + per-host conf path common.sh, README.md, README-User_Script_Plug-in.md: comment refs All Partnership, Fallback, Monitors, Transcodes, Tools scripts: comment refs
This commit is contained in:
@@ -154,6 +154,8 @@ line() { REPORT+=(" $1"); }
|
||||
issue() { ISSUES+=("$1"); REPORT+=(" ⚠️ $1"); }
|
||||
finding() { FINDINGS+=("$1"); REPORT+=(" ℹ️ $1"); }
|
||||
|
||||
get_array() { eval "echo \"\${${1}[*]}\""; }
|
||||
|
||||
format_bytes() {
|
||||
local bytes=$1
|
||||
if (( bytes > 1073741824 )); then
|
||||
@@ -656,6 +658,90 @@ if command -v tailscale >/dev/null 2>&1; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# ==============================================================================================
|
||||
# ━━━ 🔗 MESH ━━━
|
||||
# ==============================================================================================
|
||||
section "🔗 MESH"
|
||||
|
||||
_ALL_HOST_IDS=()
|
||||
for _h in HOST1 HOST2 HOST3 HOST4 HOST5 HOST6 HOST7 HOST8; do
|
||||
[[ -n "${!_h:-}" ]] && _ALL_HOST_IDS+=("$_h")
|
||||
done
|
||||
|
||||
# ── Members ──
|
||||
if [[ ${#_ALL_HOST_IDS[@]} -eq 0 ]]; then
|
||||
line "No hosts defined"
|
||||
else
|
||||
line "Members:"
|
||||
for _h in "${_ALL_HOST_IDS[@]}"; do
|
||||
_server="${!_h}"
|
||||
_owner_var="${_h}_OWNER"; _owner="${!_owner_var:-unknown}"
|
||||
_email_var="${_h}_OWNER_EMAIL"; _email="${!_email_var:-(not set)}"
|
||||
line " $_h $_server / $_owner / $_email"
|
||||
done
|
||||
fi
|
||||
|
||||
# ── Protected Services ──
|
||||
_coverage_found=false
|
||||
for _covered in "${_ALL_HOST_IDS[@]}"; do
|
||||
_covered_owner_var="${_covered}_OWNER"; _covered_owner="${!_covered_owner_var:-$_covered}"
|
||||
_covered_email_var="${_covered}_OWNER_EMAIL"; _covered_email="${!_covered_email_var:-}"
|
||||
|
||||
declare -A _tier_containers=()
|
||||
declare -A _tier_delays=()
|
||||
_covered_by=""
|
||||
_any_tiers=false
|
||||
|
||||
for _covering in "${_ALL_HOST_IDS[@]}"; do
|
||||
[[ "$_covering" == "$_covered" ]] && continue
|
||||
for _tier in 1 2 3 4; do
|
||||
_containers=$(get_array "FALLBACK_${_covering}_COVERS_${_covered}_TIER${_tier}")
|
||||
[[ -z "$_containers" ]] && continue
|
||||
_any_tiers=true
|
||||
_tier_containers[$_tier]="$_containers"
|
||||
_delay_var="${_covered}_TIER${_tier}_DELAY"
|
||||
_tier_delays[$_tier]="${!_delay_var:-0}"
|
||||
done
|
||||
if [[ "$_any_tiers" == true ]]; then
|
||||
_cov_owner_var="${_covering}_OWNER"; _cov_owner="${!_cov_owner_var:-$_covering}"
|
||||
_covered_by="$_covering ($_cov_owner)"
|
||||
fi
|
||||
done
|
||||
|
||||
[[ "$_any_tiers" == false ]] && { unset _tier_containers _tier_delays; declare -A _tier_containers=() _tier_delays=(); continue; }
|
||||
|
||||
_coverage_found=true
|
||||
_hdr="$_covered_owner"
|
||||
[[ -n "$_covered_email" ]] && _hdr+=" — $_covered_email"
|
||||
line "Protected: $_hdr"
|
||||
for _tier in 1 2 3 4; do
|
||||
[[ -z "${_tier_containers[$_tier]:-}" ]] && continue
|
||||
_d="${_tier_delays[$_tier]:-0}"
|
||||
if (( _d == 0 )); then _dlabel="immediate"
|
||||
elif (( _d >= 1440 )); then _dlabel="$(( _d / 1440 ))d"
|
||||
elif (( _d >= 60 )); then _dlabel="$(( _d / 60 ))hr"
|
||||
else _dlabel="${_d}min"
|
||||
fi
|
||||
line " Tier $_tier (${_dlabel}): ${_tier_containers[$_tier]// /, }"
|
||||
done
|
||||
[[ -n "$_covered_by" ]] && line " Covered by: $_covered_by"
|
||||
|
||||
unset _tier_containers _tier_delays
|
||||
declare -A _tier_containers=() _tier_delays=()
|
||||
done
|
||||
|
||||
[[ "$_coverage_found" == false ]] && line "No fallback coverage configured"
|
||||
|
||||
# ── Partnership ──
|
||||
if [[ "${PARTNERSHIP_ENABLED:-false}" == true ]]; then
|
||||
_po_host="${PARTNERSHIP_OWNER_HOST:-HOST1}"
|
||||
_po_server="${!_po_host:-unknown}"
|
||||
_po_name_var="${_po_host}_OWNER"; _po_name="${!_po_name_var:-unknown}"
|
||||
line "Partnership: enabled — owner $_po_host ($_po_server / $_po_name), sync every ${PARTNERSHIP_SYNC_INTERVAL:-15}min"
|
||||
else
|
||||
line "Partnership: disabled"
|
||||
fi
|
||||
|
||||
# ==============================================================================================
|
||||
# ━━━ 🔐 SECURITY ━━━
|
||||
# ==============================================================================================
|
||||
|
||||
Reference in New Issue
Block a user