19 lines
421 B
Bash
Executable file
19 lines
421 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
if [ ! -f config/icecast.env ]; then
|
|
echo "error: config/icecast.env missing — copy from icecast.env.example and fill in" >&2
|
|
exit 1
|
|
fi
|
|
|
|
set -a
|
|
. ./config/icecast.env
|
|
set +a
|
|
|
|
envsubst '${ADMIN_PW} ${SOURCE_PW} ${RELAY_PW}' \
|
|
< config/icecast.xml.tmpl \
|
|
> config/icecast.xml
|
|
|
|
chmod 0640 config/icecast.xml
|
|
echo "rendered config/icecast.xml"
|