File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,25 @@ nextcloud_occ fulltextsearch:configure '{"search_platform":"OCA\\FullTextSearch_
169169nextcloud_occ fulltextsearch_elasticsearch:configure " {\" elastic_host\" :\" http://elastic:$ELASTIC_USER_PASSWORD @localhost:9200\" ,\" elastic_index\" :\" ${NEXTCLOUD_INDEX} \" }"
170170nextcloud_occ files_fulltextsearch:configure " {\" files_pdf\" :\" 1\" ,\" files_office\" :\" 1\" }"
171171
172+ # Add SystemD service for live indexing
173+ cat << SYSTEMCTL_FTS > "/etc/systemd/system/$FULLTEXTSEARCH_SERVICE "
174+ [Unit]
175+ Description=Elasticsearch Worker for Nextcloud FullTextSearch
176+ After=network.target
177+
178+ [Service]
179+ User=www-data
180+ Group=www-data
181+ WorkingDirectory=$NCPATH
182+ ExecStart=/usr/bin/php $NCPATH /occ fulltextsearch:live -q
183+ ExecStop=/usr/bin/php $NCPATH /occ fulltextsearch:stop
184+ Nice=19
185+ Restart=always
186+
187+ [Install]
188+ WantedBy=multi-user.target
189+ SYSTEMCTL_FTS
190+
172191# Wait further for cache for index to work
173192countdown " Waiting for a few seconds before indexing starts..." " 10"
174193if nextcloud_occ fulltextsearch:test
179198 if nextcloud_occ fulltextsearch:index < /dev/null
180199 then
181200 msg_box " Full Text Search was successfully installed!"
201+ # Enable the live service
202+ systemctl enable " $FULLTEXTSEARCH_SERVICE "
203+ systemctl start " $FULLTEXTSEARCH_SERVICE "
182204 fi
183205else
184206 msg_box " There seems to be an issue with the Full Text Search test. Please report this to $ISSUES ."
Original file line number Diff line number Diff line change @@ -172,13 +172,14 @@ ENVASIVE=/etc/apache2/mods-available/mod-evasive.load
172172APACHE2=/etc/apache2/apache2.conf
173173# Full text Search
174174fulltextsearch_install () {
175+ FULLTEXTSEARCH_DIR=" $SCRIPTS " /fulltextsearch
175176 NEXTCLOUD_INDEX=$( gen_passwd " $SHUF " ' [:lower:]' )
176177 ELASTIC_USER_PASSWORD=$( gen_passwd " $SHUF " ' [:lower:]' )
177178 FULLTEXTSEARCH_IMAGE_NAME=fulltextsearch_es01
179+ FULLTEXTSEARCH_SERVICE=nextcloud-fulltext-elasticsearch-worker.service
178180 # Legacy, changed 2023-09-21
179181 DOCKER_IMAGE_NAME=es01
180- FULLTEXTSEARCH_DIR=" $SCRIPTS " /fulltextsearch
181- # Legacy
182+ # Legacy, not used at all
182183 RORDIR=/opt/es/
183184 OPNSDIR=/opt/opensearch
184185 nc_fts=" ark74/nc_fts"
You can’t perform that action at this time.
0 commit comments