Fix Zebra server not starting
This commit is contained in:
parent
ba293fbf69
commit
b388164147
|
|
@ -20,10 +20,11 @@ KOHA_LANGS=
|
||||||
ZEBRA_MARC_FORMAT=marc21
|
ZEBRA_MARC_FORMAT=marc21
|
||||||
|
|
||||||
# Elasticsearch options
|
# 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
|
# container is set yp to use Elasticsearch. A
|
||||||
# Zebra server is spawned inside the container,
|
# Zebra server is spawned inside the container,
|
||||||
# otherwise.
|
# otherwise.
|
||||||
|
#USE_ELASTICSEARCH=true
|
||||||
#ELASTICSEARCH_HOST=
|
#ELASTICSEARCH_HOST=
|
||||||
#OVERRIDE_SYSPREF_SearchEngine=Elasticsearch
|
#OVERRIDE_SYSPREF_SearchEngine=Elasticsearch
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#!/command/execlineb -P
|
#!/command/execlineb -P
|
||||||
with-contenv
|
|
||||||
|
|
||||||
fdmove -c 2 1
|
fdmove -c 2 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
#!/command/execlineb -P
|
#!/command/execlineb -P
|
||||||
|
with-contenv
|
||||||
|
|
||||||
|
importas -D "" elastic USE_ELASTICSEARCH
|
||||||
|
|
||||||
|
if -n { test "${elastic}" = "true" }
|
||||||
|
|
||||||
fdmove -c 2 1
|
fdmove -c 2 1
|
||||||
|
|
||||||
s6-envdir /etc/koha-envvars
|
s6-envdir /etc/koha-envvars
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,14 @@
|
||||||
#!/command/execlineb -P
|
#!/command/execlineb -P
|
||||||
|
with-contenv
|
||||||
|
|
||||||
|
importas -D "" elastic USE_ELASTICSEARCH
|
||||||
|
|
||||||
|
if -n { test "${elastic}" = "true" }
|
||||||
|
|
||||||
fdmove -c 2 1
|
fdmove -c 2 1
|
||||||
|
|
||||||
|
s6-envdir /etc/koha-envvars
|
||||||
|
|
||||||
s6-setuidgid default-koha
|
s6-setuidgid default-koha
|
||||||
|
|
||||||
/usr/bin/zebrasrv -v 1 -f /etc/koha/sites/default/koha-conf.xml
|
/usr/bin/zebrasrv -v 1 -f /etc/koha/sites/default/koha-conf.xml
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ MB_PARAMS="--mb-host ${MB_HOST} --mb-port ${MB_PORT} --mb-user ${MB_USER} --mb-p
|
||||||
|
|
||||||
# Configure the elasticsearch server
|
# Configure the elasticsearch server
|
||||||
ES_PARAMS=""
|
ES_PARAMS=""
|
||||||
if [[ "${ELASTICSEARCH_HOST}" != "" ]]
|
if [[ "${USE_ELASTICSEARCH}" = "true" ]]
|
||||||
then
|
then
|
||||||
ES_PARAMS="--elasticsearch-server ${ELASTICSEARCH_HOST}"
|
ES_PARAMS="--elasticsearch-server ${ELASTICSEARCH_HOST}"
|
||||||
fi
|
fi
|
||||||
|
|
@ -45,12 +45,8 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Configure search daemon
|
# Configure search daemon
|
||||||
if [ "${USE_ELASTICSEARCH}" != "true" ]
|
if [ "${USE_ELASTICSEARCH}" = "true" ]
|
||||||
then
|
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} &
|
koha-elasticsearch --rebuild -p $(grep -c ^processor /proc/cpuinfo) ${KOHA_INSTANCE} &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue