feat: Add ICECAST_HOSTNAME config for YP directory registration
- Add hostname substitution in icecast-entrypoint.sh - Update environment.sh.template with ICECAST_HOSTNAME option - Defaults to localhost for dev, production sets ice.asteroid.radio - Fixes YP directories showing localhost:8000 as stream URL
This commit is contained in:
parent
1760fa5768
commit
821352edb7
|
|
@ -16,3 +16,8 @@ export ASTEROID_DB_PASSWORD=asteroid_db_2025
|
||||||
# Set to 'true' ONLY on production (asteroid.radio)
|
# Set to 'true' ONLY on production (asteroid.radio)
|
||||||
# Leave unset or 'false' for development to avoid polluting public listings
|
# Leave unset or 'false' for development to avoid polluting public listings
|
||||||
# export ICECAST_ENABLE_YP=true
|
# export ICECAST_ENABLE_YP=true
|
||||||
|
|
||||||
|
# Icecast Hostname (reported to YP directories)
|
||||||
|
# Production should set this to the public hostname
|
||||||
|
# Dev defaults to 'localhost' if unset
|
||||||
|
# export ICECAST_HOSTNAME=ice.asteroid.radio
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Generate icecast.xml from base config
|
# Generate icecast.xml from base config
|
||||||
# If ICECAST_ENABLE_YP=true, insert YP directory blocks
|
# - Substitute hostname (defaults to localhost for dev)
|
||||||
|
# - If ICECAST_ENABLE_YP=true, insert YP directory blocks
|
||||||
|
|
||||||
cp /etc/icecast.xml.base /etc/icecast.xml
|
cp /etc/icecast.xml.base /etc/icecast.xml
|
||||||
|
|
||||||
|
# Set hostname (defaults to localhost if not specified)
|
||||||
|
ICECAST_HOSTNAME=${ICECAST_HOSTNAME:-localhost}
|
||||||
|
echo "Icecast hostname: $ICECAST_HOSTNAME"
|
||||||
|
sed -i "s|<hostname>localhost</hostname>|<hostname>$ICECAST_HOSTNAME</hostname>|" /etc/icecast.xml
|
||||||
|
|
||||||
if [ "$ICECAST_ENABLE_YP" = "true" ]; then
|
if [ "$ICECAST_ENABLE_YP" = "true" ]; then
|
||||||
echo "YP directory publishing ENABLED"
|
echo "YP directory publishing ENABLED"
|
||||||
# Insert YP config before closing </icecast> tag
|
# Insert YP config before closing </icecast> tag
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue