From 7148c10f1bdd6624c655a9a8e71dfa98caca10ad Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Sun, 13 Jun 2021 12:54:24 +0200 Subject: [PATCH] update docker entrypoint --- docker/docker-entrypoint.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 13bc56b85..e494eac75 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -29,13 +29,9 @@ initialize() { mkdir -p /tmp/paperless set +e - CURRENT_USER=$(stat -c '%U' ../) - CURRENT_GROUP=$(stat -c '%G' ../) - if [[ ${CURRENT_USER} != "paperless" || ${CURRENT_GROUP} != "paperless" ]] ; then - echo "Adjusting permissions of paperless files. This may take a while." - chown -R paperless:paperless ../ - fi + echo "Adjusting permissions of paperless files. This may take a while." chown -R paperless:paperless /tmp/paperless + find .. -not \( -user paperless -and -group paperless \) -exec chown paperless:paperless {} + set -e gosu paperless /sbin/docker-prepare.sh