Added live indexing service

This commit is contained in:
Philip (a-0) 2023-01-23 16:36:37 +01:00
parent 5565498be5
commit 3ad0db6973
2 changed files with 29 additions and 0 deletions

View file

@ -72,4 +72,18 @@
name: elasticsearch
state: restarted
enabled: yes
daemon_reload: yes
- name: Set live-index serice file
template:
src: nextcloud-fulltextsearch-live-index.service.j2
dest: /etc/systemd/system/nextcloud-fulltextsearch-live-index.service
owner: root
group: root
- name: Load and start live-index service
service:
name: nextcloud-fulltextsearch-live-index
state: restarted
enabled: yes
daemon_reload: yes

View file

@ -0,0 +1,15 @@
[Unit]
Description=Nextcloud FullTextSearch live indexing service
After=elasticsearch.service
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/nextcloud
ExecPre=/bin/sleep 10
ExecStart=/usr/bin/php /var/www/nextcloud/occ fulltextsearch:live -q
ExecStop=/usr/bin/php /var/www/nextcloud/occ fulltextsearch:stop
Restart=always
[Install]
WantedBy=multi-user.target