Drop narration, history and restated-code comments across the repo, keep short ones for security boundaries, upstream quirks and ordering constraints, and record the convention in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
18 lines
689 B
Bash
Executable File
18 lines
689 B
Bash
Executable File
#!/bin/bash
|
|
# Runs icecast2 and liquidsoap together (liquidsoap feeds icecast over
|
|
# localhost). Bare envsubst: an unset variable becomes "", including passwords.
|
|
# If either daemon exits the container exits 1, so restart: always recycles it.
|
|
set -e
|
|
|
|
envsubst < /etc/icecast2/icecast.xml.template > /etc/icecast2/icecast.xml
|
|
envsubst < /etc/liquidsoap/stream.liq.template > /etc/liquidsoap/stream.liq
|
|
|
|
icecast2 -c /etc/icecast2/icecast.xml &
|
|
# Give icecast time to bind before liquidsoap tries to connect as a source.
|
|
sleep 2
|
|
liquidsoap /etc/liquidsoap/stream.liq &
|
|
# Exit as soon as either daemon dies, then take the other down with it.
|
|
wait -n
|
|
kill $(jobs -p) 2>/dev/null || true
|
|
exit 1
|