From 84dc1c8f74bf171912574ee0c27f0cac2ff934cc Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 14 Feb 2022 09:25:02 +0100 Subject: [PATCH] Update 99-run.sh --- joplin/rootfs/etc/cont-init.d/99-run.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/joplin/rootfs/etc/cont-init.d/99-run.sh b/joplin/rootfs/etc/cont-init.d/99-run.sh index 471cd7776..05e56f0ce 100644 --- a/joplin/rootfs/etc/cont-init.d/99-run.sh +++ b/joplin/rootfs/etc/cont-init.d/99-run.sh @@ -12,14 +12,16 @@ bashio::log.warning "Warning : a custom data location was selected, but the prev fi # Create folder - echo "Creating $LOCATION" - mkdir -p "$LOCATION" - if [ ! -f "$LOCATION"/database.sqlite ]; then - cp /home/joplin/packages/server/db-prod.sqlite "$LOCATION"/database.sqlite + if [ ! -d "$LOCATION" ]; then + echo "Creating $LOCATION" + mkdir -p "$LOCATION" fi - #touch "$LOCATION"/database.sqlite - mkdir -p "$LOCATION"/resources + touch "$LOCATION"/database.sqlite + + if [ ! -d "$LOCATION"/resources ]; then + mkdir -p "$LOCATION"/resources + fi ln -s $LOCATION/resources /home/joplin/packages/server chown -R joplin:joplin "$LOCATION"