23 lines
829 B
Bash
23 lines
829 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
echo "=== Linear Void Playout Service Starting ==="
|
|
echo "Playlist path: ${PLAYLIST_PATH:=/app/playlist/playlist.txt}"
|
|
echo "HLS segment duration: ${HLS_SEGMENT_DURATION:-2}s"
|
|
echo "HLS window size: ${HLS_WINDOW_SIZE:-12}"
|
|
|
|
# Ensure playlist directory and file exist
|
|
mkdir -p "$(dirname "$PLAYLIST_PATH")"
|
|
if [ ! -f "$PLAYLIST_PATH" ]; then
|
|
echo "Warning: Playlist not found at $PLAYLIST_PATH. Creating demo playlist."
|
|
cat > "$PLAYLIST_PATH" << EOF
|
|
# Linear Void Demo Playlist
|
|
file '/app/media/demo1.mp4'
|
|
file '/app/media/demo2.mp4'
|
|
EOF
|
|
fi
|
|
|
|
# Single source of truth: the Go binary validates the playlist (ADR-001/ADR-003
|
|
# normalization enforcement) and runs the full loop (HLS, R2 sync, slate
|
|
# fallback, health server). Validation runs once inside the binary.
|
|
exec /app/playlist-manager "$PLAYLIST_PATH" |