Improved image and documentation
[sima-docker.git] / sima / start
index 09c268d..6211e9e 100644 (file)
@@ -5,12 +5,15 @@ su -c "icecast2 -b -c /etc/icecast2/icecast.xml" icecast2
 
 su -c "mpd /etc/mpd.conf" mpd
 
-if [ -e /etc/mpd-sima.cfg ]; then
-    OPTIONS="${OPTIONS} --config /etc/mpd-sima.cfg"
+OPTIONS=""
+if [ -z "${MPD_SIMA}" ];then
+    if [ -e /etc/mpd-sima.cfg ]; then
+        OPTIONS="--config /etc/mpd-sima.cfg"
+    fi
 fi
 
-OPTIONS="${OPTIONS} --log /var/log/mpd/mpd-sima.log --daemon"
-su -c "sh /usr/bin/sima ${OPTIONS}" mpd
+MPD_SIMA=${MPD_SIMA:-"--log /var/log/mpd/mpd-sima.log"}
+su -c "sh /usr/bin/mpd-sima --daemon ${OPTIONS} ${MPD_SIMA}" mpd
 
 tail -F /var/log/icecast2/access.log \
         /var/log/icecast2/error.log \