feat: add icecast config template + envsubst renderer

This commit is contained in:
devilreef 2026-04-29 23:14:34 +06:00
parent b122cdaf34
commit 7db31e326d
Signed by: devilreef
SSH key fingerprint: SHA256:UZisRr4iuXx+IhkbZnR655L2RWAT6o2rgbGv5F/6m3Y
3 changed files with 74 additions and 0 deletions

19
scripts/render-config.sh Executable file
View file

@ -0,0 +1,19 @@
#!/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"