Improved image and documentation
[sima-docker.git] / sima / start
1 #!/bin/sh
2
3 # Hand over to icecast
4 su -c "icecast2 -b -c /etc/icecast2/icecast.xml" icecast2
5
6 su -c "mpd /etc/mpd.conf" mpd
7
8 OPTIONS=""
9 if [ -z "${MPD_SIMA}" ];then
10     if [ -e /etc/mpd-sima.cfg ]; then
11         OPTIONS="--config /etc/mpd-sima.cfg"
12     fi
13 fi
14
15 MPD_SIMA=${MPD_SIMA:-"--log /var/log/mpd/mpd-sima.log"}
16 su -c "sh /usr/bin/mpd-sima --daemon ${OPTIONS} ${MPD_SIMA}" mpd
17
18 tail -F /var/log/icecast2/access.log \
19         /var/log/icecast2/error.log \
20         /var/log/mpd/mpd.log \
21         /var/log/mpd/mpd-sima.log