mirror of
git://f0xx.org/ac/ac-ms-media-transcode
synced 2026-07-29 03:37:39 +03:00
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:
27
bin/stop.sh
Executable file
27
bin/stop.sh
Executable 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"
|
||||
Reference in New Issue
Block a user