From 9744a0564114c97fe5b2489f69baa2cf91d6703a Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 18 Oct 2021 21:51:22 +0200 Subject: [PATCH] Update 99-configuration --- .../rootfs/etc/cont-init.d/99-configuration | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/papermerge/rootfs/etc/cont-init.d/99-configuration b/papermerge/rootfs/etc/cont-init.d/99-configuration index 20b06a9b6..b7559c6b9 100644 --- a/papermerge/rootfs/etc/cont-init.d/99-configuration +++ b/papermerge/rootfs/etc/cont-init.d/99-configuration @@ -16,3 +16,25 @@ IMPORTDIR="$(bashio::config 'import_dir')" sed -i "2 i\export IMPORTER_DIR=$IMPORTDIR" /etc/services.d/papermerge/run bashio::log.info "Import dir set to $IMPORTDIR" + +################## +# CREATE FOLDERS # +################## + +if [ ! -d /config ]; then + echo "Creating /config" + mkdir -p /config + chown -R abc:abc /config +fi + +if [ ! -d $MEDIADIR ]; then + echo "Creating $MEDIADIR" + mkdir -p $MEDIADIR + chown -R abc:abc $MEDIADIR +fi + +if [ ! -d $IMPORTDIR ]; then + echo "Creating $IMPORTDIR" + mkdir -p $IMPORTDIR + chown -R abc:abc $IMPORTDIR +fi