mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-22 13:24:22 +00:00
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Antoine Mérino <3023499+Merinorus@users.noreply.github.com>
13 lines
388 B
Plaintext
Executable File
13 lines
388 B
Plaintext
Executable File
#!/command/with-contenv /usr/bin/bash
|
|
# shellcheck shell=bash
|
|
|
|
declare -r log_prefix="[init-index]"
|
|
|
|
echo "${log_prefix} Checking search index..."
|
|
cd "${PAPERLESS_SRC_DIR}"
|
|
if [[ -n "${USER_IS_NON_ROOT}" ]]; then
|
|
python3 manage.py document_index reindex --if-needed --no-progress-bar
|
|
else
|
|
s6-setuidgid paperless python3 manage.py document_index reindex --if-needed --no-progress-bar
|
|
fi
|