This commit is contained in:
Brandon
2019-08-23 20:02:38 -05:00
parent 11ed8232e9
commit 3201b5653d
5 changed files with 38 additions and 32 deletions

View File

@@ -0,0 +1,23 @@
#!/bin/sh
set -euo pipefail
if [ ! -r /data/.config/mopidy.conf ]; then
mkdir -p /data/.config
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/logs ]; then
mkdir -p /data/logs/mopidy
mkdir -p /data/logs/icecast
fi
chown -R mopidy:mopidy /data
su-exec mopidy mopidy --config /data/.config/mopidy.conf local scan
exec "${@}"