Put the media seed behind MEDIA_SEED_ENABLED so a partner filled by other means never starts a multi-week transfer

Tier 2 beside the per-orchestrator gates. Unset reads as on — the toggle postdates the seed.
This commit is contained in:
Gmer4Lfe
2026-08-17 07:46:51 -04:00
parent ad623353bc
commit 1a47f864f9
7 changed files with 139 additions and 37 deletions
+14 -1
View File
@@ -1089,8 +1089,20 @@ _seed_job="Rsync/media_seed.sh"
_seed_script="$SCRIPTS_ROOT/Rsync/media_seed.sh"
_runner="$SCRIPTS_ROOT/Plugin/$PLATFORM/run_job.sh"
# Read from disk, not from the sourced value: Step 9c rewrote master.conf a few steps ago.
# Unset reads as on — the toggle postdates the seed, so a conf that has not been through a
# conf_upgrade must keep the behaviour it had. media_seed.sh checks this again itself; the
# check here exists so the summary can say "disabled" instead of dispatching a job whose only
# act is to exit.
_seed_gate=$(grep -m1 -E '^[[:space:]]*MEDIA_SEED_ENABLED=' "$SCRIPTS_ROOT/Configurations/master.conf" 2>/dev/null \
| cut -d= -f2- | cut -d'#' -f1 | tr -d '"'"'" | tr -d '[:space:]')
if [[ "$SKIP_MEDIA_SEED" == true ]]; then
warn "Skipping (--skip-media-seed)"
elif [[ -n "$_seed_gate" && "$_seed_gate" != "true" ]]; then
warn "MEDIA_SEED_ENABLED is '$_seed_gate' — not dispatching the seed"
warn "$MIRROR will need its library filled another way, or arm the toggle and start it"
warn "from the Partnership tab"
elif [[ "$ONBOARD_OK" == false ]]; then
warn "Skipping — onboard did not complete"
elif [[ "$DRY_RUN" == true ]]; then
@@ -1158,8 +1170,9 @@ echo " Step 10 — Conf push: $( [[ "$ONBOARD_OK" == false ]] && echo "s
echo " Step 11 — Discovery: $( [[ "$POPULATE_OK" == skipped ]] && echo "skipped (unreachable)" || _ok "$POPULATE_OK" )"
echo " Step 12 — Grouping: $( [[ "$FOLDER_OK" == skipped ]] && echo "skipped" || _ok "$FOLDER_OK" )"
echo " Step 13 — Media seed: $( [[ "$SKIP_MEDIA_SEED" == true ]] && echo "skipped" \
|| { [[ -n "${_seed_gate:-}" && "${_seed_gate:-}" != "true" ]] && echo "off (MEDIA_SEED_ENABLED=$_seed_gate)" \
|| { [[ "$MEDIA_SEED_DISPATCHED" == true ]] && echo "dispatched — runs in background ✅" \
|| echo "not dispatched ❌"; } )"
|| echo "not dispatched ❌"; }; } )"
echo ""
if [[ "$ONBOARD_OK" == true ]]; then