#!/bin/sh # Generate icecast.xml from base config # If ICECAST_ENABLE_YP=true, insert YP directory blocks cp /etc/icecast.xml.base /etc/icecast.xml if [ "$ICECAST_ENABLE_YP" = "true" ]; then echo "YP directory publishing ENABLED" # Insert YP config before closing tag sed -i 's||'"$(cat /etc/icecast-yp.xml.snippet)"'\n|' /etc/icecast.xml else echo "YP directory publishing DISABLED (dev mode)" fi # Start icecast exec icecast -c /etc/icecast.xml