paperless-ngx: reindex Tantivy search index on webserver start

This commit is contained in:
MickLesk
2026-08-10 17:27:16 +02:00
parent 1001309bde
commit c82998ce5a
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -166,6 +166,8 @@ function update_script() {
msg_info "Updating Paperless-ngx"
if ((BRIDGE_UPDATE == 0)); then
sed -i 's|^ExecStart=.*|ExecStart=uv run -- granian --interface asginl --ws --loop uvloop "paperless.asgi:application"|' /etc/systemd/system/paperless-webserver.service
grep -q "document_index reindex" /etc/systemd/system/paperless-webserver.service ||
sed -i '/^ExecStart=/i ExecStartPre=uv run -- python manage.py document_index reindex --if-needed --no-progress-bar' /etc/systemd/system/paperless-webserver.service
$STD systemctl daemon-reload
fi
cd /opt/paperless