Files
dss.docker/icecast/start.sh
2015-11-01 14:26:26 +00:00

24 lines
782 B
Bash
Executable File

#!/bin/sh
env
set -x
if [ -n "$ICECAST_SOURCE_PASSWORD" ]; then
sed -i "s/<source-password>[^<]*<\/source-password>/<source-password>$ICECAST_SOURCE_PASSWORD<\/source-password>/g" /etc/icecast2/icecast.xml
fi
if [ -n "$ICECAST_RELAY_PASSWORD" ]; then
sed -i "s/<relay-password>[^<]*<\/relay-password>/<relay-password>$ICECAST_RELAY_PASSWORD<\/relay-password>/g" /etc/icecast2/icecast.xml
fi
if [ -n "$ICECAST_ADMIN_PASSWORD" ]; then
sed -i "s/<admin-password>[^<]*<\/admin-password>/<admin-password>$ICECAST_ADMIN_PASSWORD<\/admin-password>/g" /etc/icecast2/icecast.xml
fi
if [ -n "$ICECAST_PASSWORD" ]; then
sed -i "s/<password>[^<]*<\/password>/<password>$ICECAST_PASSWORD<\/password>/g" /etc/icecast2/icecast.xml
fi
supervisord -n -c /etc/supervisord.conf