From 3d8de50b5a88b568a9b92efcd14a02c62aed3342 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Wed, 28 Feb 2024 14:46:24 -0800 Subject: [PATCH] Don't assume the /tmp folder is where the user wants to place the scratch directory (#5948) --- docker/docker-entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 37f9d7288..017e37384 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -90,13 +90,13 @@ initialize() { fi done - local -r tmp_dir="/tmp/paperless" - echo "Creating directory ${tmp_dir}" + local -r tmp_dir="${PAPERLESS_SCRATCH_DIR:=/tmp/paperless}" + echo "Creating directory scratch directory ${tmp_dir}" mkdir --parents "${tmp_dir}" set +e echo "Adjusting permissions of paperless files. This may take a while." - chown -R paperless:paperless ${tmp_dir} + chown -R paperless:paperless "${tmp_dir}" for dir in \ "${export_dir}" \ "${DATA_DIR}" \