Add lab restream pipeline with pirate_drift logo and lib/env.sh.

Encode-once/fanout scripts, HLS output, and single overloadable env source.
Commits assets/pirate_drift.png as default watermark for cluster runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-07-11 15:27:24 +02:00
parent d990862b64
commit 5ca8a9f539
27 changed files with 911 additions and 1 deletions

27
bin/stop.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck disable=SC1091
source "${ROOT}/lib/common.sh"
stop_pidfile() {
local pf="$1"
[[ -f "${pf}" ]] || return 0
local pid
pid="$(cat "${pf}")"
if kill -0 "${pid}" 2>/dev/null; then
kill "${pid}" 2>/dev/null || true
sleep 1
kill -9 "${pid}" 2>/dev/null || true
fi
rm -f "${pf}"
}
stop_pidfile "${RUN_DIR}/fanout.pid"
stop_pidfile "${RUN_DIR}/encode.pid"
pkill -f "${ROOT}/bin/fanout-copy.sh" 2>/dev/null || true
pkill -f "${ROOT}/bin/encode-once.sh" 2>/dev/null || true
remove_pipe
rm -f "${ROOT}/.intro_shown" "${ROOT}/.current_source" 2>/dev/null || true
log "pipeline stopped"