update docker entrypoint

This commit is contained in:
jonaswinkler 2021-06-13 12:54:24 +02:00
parent 4a1a66248d
commit 7148c10f1b

View File

@ -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