Create run.sh

This commit is contained in:
Alexandre
2022-07-09 21:07:25 +02:00
committed by GitHub
parent de09066e30
commit 9ef4e37167

13
wger/rootfs/run.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
LOCATION=/data
python3 manage.py migrate || true
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
echo "Launch app"
su -H -u wger bash -c /./home/wger/entrypoint.sh