From a50377bdf83c39d111b596e1d61ef485a388771c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 13 Feb 2022 23:22:29 +0100 Subject: [PATCH] Update 99-run.sh --- joplin/rootfs/etc/cont-init.d/99-run.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/joplin/rootfs/etc/cont-init.d/99-run.sh b/joplin/rootfs/etc/cont-init.d/99-run.sh index 1e41f6cd5..fd3e98f73 100644 --- a/joplin/rootfs/etc/cont-init.d/99-run.sh +++ b/joplin/rootfs/etc/cont-init.d/99-run.sh @@ -2,14 +2,6 @@ bashio::log.warning "Warning - minimum configuration recommended : 2 cpu cores and 4 GB of memory. Otherwise the system will become unresponsive and crash." - - # Create folder - echo "Creating $LOCATION" - mkdir -p "$LOCATION" - mkdir -p "$LOCATION"/resources - ln -s $LOCATION/resources /home/joplin/packages/server - - # Check data location LOCATION=$(bashio::config 'data_location') if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then @@ -19,6 +11,14 @@ else bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually" fi + # Create folder + echo "Creating $LOCATION" + mkdir -p "$LOCATION" + mkdir -p "$LOCATION"/resources + ln -s $LOCATION/resources /home/joplin/packages/server + +export SQLITE_DATABASE="$LOCATION/database.sqlite" + if bashio::config.has_value 'POSTGRES_DATABASE'; then bashio::log.info "Using postgres" @@ -32,8 +32,6 @@ else bashio::log.info "Using sqlite" -export SQLITE_DATABASE="$LOCATION/database.sqlite" - fi ##############