feat: add icecast config template + envsubst renderer
This commit is contained in:
parent
b122cdaf34
commit
7db31e326d
3 changed files with 74 additions and 0 deletions
19
scripts/render-config.sh
Executable file
19
scripts/render-config.sh
Executable 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue