This commit is contained in:
Brandon
2019-08-24 03:03:39 -05:00
parent e8abccfb93
commit 8683c4e24a
6 changed files with 97 additions and 9 deletions

View File

@@ -7,6 +7,17 @@ if [ ! -r /data/.config/mopidy.conf ]; then
cp /defaults/mopidy.conf /data/.config
fi
if [ ! -r /data/.config/icecast.xml ]; then
mkdir -p /data/.config
cp /defaults/icecast.xml /data/.config
fi
if [ ! -r /data/icecast ]; then
mkdir -p /data/icecast/logs
cp -r /usr/share/icecast /data/icecast
cp /defaults/silence.mp3 /data/icecast/web/silence.mp3
fi
chown -R mopidy:mopidy /data
su-exec mopidy mopidy --config /data/.config/mopidy.conf local scan

View File

@@ -1,6 +1,8 @@
#!/bin/sh
trap "kill $PID" HUP INT TERM
su-exec mopidy snapserver -s pipe:///tmp/snapfifo?name=Mopidy&sampleformat=48000:16:2 -d &
su-exec mopidy icecast -c /data/.config/icecast.xml -b &
su-exec mopidy mopidy --config /data/.config/mopidy.conf "${@}" &
PID=$!
wait $PID