mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-27 09:46:04 +02:00
Update run.sh
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user