mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-29 19:15:43 +00:00
Skips this unit during non-root user startup too
This commit is contained in:
1 parent
e1ee7e6c66
commit
cdea16f86f
1 file changed
+7
@@ -11,6 +11,13 @@ if [[ "${S6_READ_ONLY_ROOT}" == "1" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# When running as a non-root user, site-packages is still root-owned and unwritable,
|
||||
# so this step would just fail loudly on every container start. Skip it.
|
||||
if [[ -n "${USER_IS_NON_ROOT}" ]]; then
|
||||
echo "${log_prefix} USER_IS_NON_ROOT is set, skipping (site-packages is not writable)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
declare -r site_packages="$(python3 -c 'import site; print(site.getsitepackages()[0])')"
|
||||
|
||||
# Deliberately scoped to packages that paperless.settings/paperless/__init__.py import
|
||||
|
||||
Reference in new issue
Block a user