diff --git a/entrypoint.sh b/entrypoint.sh index 5abde2b..c753511 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,6 +3,14 @@ set -e TOKEN_DB_PATH="/app/rootfs/data/data/com.apple.android.music/files/mpl_db/kvs.sqlitedb" +if [ ! -d "/app/rootfs/data/data/com.apple.android.music/files" ]; then + mkdir -p "/app/rootfs/data/data/com.apple.android.music/files" +fi + +if [ $(stat -c %U "/app/rootfs/data") != "root" ] || [ $(stat -c %G "/app/rootfs/data") != "root" ]; then + chown -R root:root "/app/rootfs/data" +fi + if [ ! -f "$TOKEN_DB_PATH" ]; then echo "Login required: account database not found." if [ -z "${USERNAME}" ] || [ -z "${PASSWORD}" ]; then