Added live indexing service
This commit is contained in:
parent
5565498be5
commit
3ad0db6973
2 changed files with 29 additions and 0 deletions
|
@ -72,4 +72,18 @@
|
||||||
name: elasticsearch
|
name: elasticsearch
|
||||||
state: restarted
|
state: restarted
|
||||||
enabled: yes
|
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
|
daemon_reload: yes
|
15
templates/nextcloud-fulltextsearch-live-index.service.j2
Normal file
15
templates/nextcloud-fulltextsearch-live-index.service.j2
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue