mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-19 11:08:11 +01:00
21 lines
627 B
Bash
21 lines
627 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
|
|
|
|
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 <wger@example.com>' && /./home/wger/entrypoint.sh"
|