Update run.sh

This commit is contained in:
Alexandre
2022-07-10 08:33:20 +02:00
committed by GitHub
parent e3508413ba
commit f13e21a7ca

View File

@@ -7,14 +7,7 @@ sed -i "s|/usr/bin/with-contenv|/usr/bin/env|g" /etc/cont-init.d/*
LOCATION=/data LOCATION=/data
mkdir -p "$LOCATION" mkdir -p "$LOCATION"
if [ ! -f "$LOCATION"/database.sqlite ]; then touch "$LOCATION"/database.sqlite
if [ -f "/home/wger/db/database.sqlite" ]; then
cp /home/wger/db/database.sqlite "$LOCATION"/database.sqlite
else
touch "$LOCATION"/database.sqlite
fi
fi
chown -R wger "$LOCATION" chown -R wger "$LOCATION"
chmod -R 777 "$LOCATION" chmod -R 777 "$LOCATION"
rm /home/wger/db/database.sqlite || true rm /home/wger/db/database.sqlite || true