From 4f32b227382175e29da6b6487cf1a657dd6c9f75 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 14 Feb 2022 08:08:39 +0100 Subject: [PATCH] Update 99-run.sh --- joplin/rootfs/etc/cont-init.d/99-run.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/joplin/rootfs/etc/cont-init.d/99-run.sh b/joplin/rootfs/etc/cont-init.d/99-run.sh index 6693da526..8533c6a44 100644 --- a/joplin/rootfs/etc/cont-init.d/99-run.sh +++ b/joplin/rootfs/etc/cont-init.d/99-run.sh @@ -14,13 +14,16 @@ fi # Create folder echo "Creating $LOCATION" mkdir -p "$LOCATION" - touch "$LOCATION"/database.sqlite + if [ ! -f "$LOCATION"/database.sqlite ]; then + cp /home/joplin/packages/server "$LOCATION"/database.sqlite + fi + #touch "$LOCATION"/database.sqlite mkdir -p "$LOCATION"/resources ln -s $LOCATION/resources /home/joplin/packages/server # chown -R www-data:www-data "$LOCATION" - chmod -R 775 "$LOCATION" + chmod -R 777 "$LOCATION" chmod 777 "$LOCATION/database.sqlite" export SQLITE_DATABASE="$LOCATION/database.sqlite" @@ -36,6 +39,7 @@ bashio::config.has_value 'POSTGRES_HOST' && export POSTGRES_HOST=$(bashio::confi else bashio::log.info "Using sqlite" + fi ##############