Fixes the management scripts under a non-root install where the user ID is something besides 1000 (#11870)

This commit is contained in:
Trenton H
2026-01-23 16:08:28 -08:00
committed by GitHub
parent 32d04e1fd3
commit 94f6b8d36d
17 changed files with 51 additions and 85 deletions

View File

@@ -5,10 +5,8 @@ set -e
cd "${PAPERLESS_SRC_DIR}"
if [[ $(id -u) == 0 ]]; then
s6-setuidgid paperless python3 manage.py document_archiver "$@"
if [[ -n "${USER_IS_NON_ROOT}" ]]; then
python3 manage.py document_archiver "$@"
elif [[ $(id -un) == "paperless" ]]; then
python3 manage.py document_archiver "$@"
else
echo "Unknown user."
s6-setuidgid paperless python3 manage.py document_archiver "$@"
fi