Fix Zebra server not starting

This commit is contained in:
Theodoros Grammenos 2023-02-18 13:14:43 +02:00
parent ba293fbf69
commit b388164147
No known key found for this signature in database
GPG key ID: D25FBC869FCFEBDE
7 changed files with 18 additions and 8 deletions

View file

@ -20,10 +20,11 @@ KOHA_LANGS=
ZEBRA_MARC_FORMAT=marc21
# Elasticsearch options
# If the ELASTICSEARCH_HOST variable is set the
# If the USE_ELASTICSEARCH variable is set the
# container is set yp to use Elasticsearch. A
# Zebra server is spawned inside the container,
# otherwise.
#USE_ELASTICSEARCH=true
#ELASTICSEARCH_HOST=
#OVERRIDE_SYSPREF_SearchEngine=Elasticsearch

View file

@ -1,5 +1,4 @@
#!/command/execlineb -P
with-contenv
fdmove -c 2 1

View file

@ -1,4 +1,10 @@
#!/command/execlineb -P
with-contenv
importas -D "" elastic USE_ELASTICSEARCH
if -n { test "${elastic}" = "true" }
fdmove -c 2 1
s6-envdir /etc/koha-envvars

View file

@ -1,6 +1,14 @@
#!/command/execlineb -P
with-contenv
importas -D "" elastic USE_ELASTICSEARCH
if -n { test "${elastic}" = "true" }
fdmove -c 2 1
s6-envdir /etc/koha-envvars
s6-setuidgid default-koha
/usr/bin/zebrasrv -v 1 -f /etc/koha/sites/default/koha-conf.xml

View file

@ -30,7 +30,7 @@ MB_PARAMS="--mb-host ${MB_HOST} --mb-port ${MB_PORT} --mb-user ${MB_USER} --mb-p
# Configure the elasticsearch server
ES_PARAMS=""
if [[ "${ELASTICSEARCH_HOST}" != "" ]]
if [[ "${USE_ELASTICSEARCH}" = "true" ]]
then
ES_PARAMS="--elasticsearch-server ${ELASTICSEARCH_HOST}"
fi
@ -45,12 +45,8 @@ else
fi
# Configure search daemon
if [ "${USE_ELASTICSEARCH}" != "true" ]
if [ "${USE_ELASTICSEARCH}" = "true" ]
then
# Start zebra services with s6
touch /etc/s6-overlay/s6-rc.d/user/contents.d/zebra-indexer
touch /etc/s6-overlay/s6-rc.d/user/contents.d/zebra-server
else
koha-elasticsearch --rebuild -p $(grep -c ^processor /proc/cpuinfo) ${KOHA_INSTANCE} &
fi