## This unit file must be installed and adjusted manually if the Fulltext search application is enabled
## https://github.com/nextcloud/fulltextsearch/wiki/Basic-Installation#live-index-service
[Unit]
Description=Elasticsearch Worker for Nextcloud Fulltext Search
After=network.target
Requires=mariadb.service

[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/nextcloud
ExecStartPre=/usr/bin/php /var/www/nextcloud/occ fulltextsearch:stop
ExecStart=/usr/bin/php /var/www/nextcloud/occ fulltextsearch:live -q
ExecStop=/usr/bin/php /var/www/nextcloud/occ fulltextsearch:stop
Nice=19
Restart=always

[Install]
WantedBy=multi-user.target
