#!/bin/bashio chmod +x /etc/cont-init.d/* sed -i "s|/usr/bin/with-contenv|/usr/bin/env|g" /etc/cont-init.d/* /./etc/cont-init.d/00-banner.sh LOCATION=/data mkdir -p "$LOCATION" touch "$LOCATION"/database.sqlite || true chown -R wger "$LOCATION" || true chmod -R 777 "$LOCATION" || true rm /home/wger/db/database.sqlite &>/dev/null || true ln -s "$LOCATION"/database.sqlite /home/wger/db python3 manage.py migrate || true cp -rn /home/wger/src /home/wger echo "Launch app" su -l wger -s /bin/sh -c "export WORKDIR=/home/wger/src && export FROM_EMAIL='wger Workout Manager ' && /./home/wger/entrypoint.sh"