Files
hassio-addons/wger/rootfs/run.sh
2022-07-09 22:31:02 +02:00

19 lines
497 B
Bash

#!/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
echo "Launch app"
su -l wger -s /bin/sh -c "/./home/wger/entrypoint.sh"