diff --git a/config/icecast.env.example b/config/icecast.env.example new file mode 100644 index 0000000..67bb394 --- /dev/null +++ b/config/icecast.env.example @@ -0,0 +1,4 @@ +# generate with: openssl rand -hex 24 +ADMIN_PW=replace-me-admin +SOURCE_PW=replace-me-source +RELAY_PW=replace-me-relay diff --git a/config/icecast.xml.tmpl b/config/icecast.xml.tmpl new file mode 100644 index 0000000..41d4ae7 --- /dev/null +++ b/config/icecast.xml.tmpl @@ -0,0 +1,51 @@ + + denpa.femboy.page + admin@denpa.femboy.page + + + 100 + 16 + 524288 + 30 + 15 + 10 + 1 + 65535 + + + + ${SOURCE_PW} + ${RELAY_PW} + admin + ${ADMIN_PW} + + + denpa.femboy.page + + + 8000 + 0.0.0.0 + + + 1 + + + /usr/share/icecast2 + /var/log/icecast2 + /usr/share/icecast2/web + /usr/share/icecast2/admin + /var/run/icecast2/icecast2.pid + + + + + - + - + 3 + 10000 + + + + 0 + + diff --git a/scripts/render-config.sh b/scripts/render-config.sh new file mode 100755 index 0000000..9806a15 --- /dev/null +++ b/scripts/render-config.sh @@ -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"