Fix detection of local elasticsearch service
If elasticsearch is local and the URL was set via rake cli to "localhost" instead of "127.0.0.1", the service is not restarted. This results in a broken state (search does not work, background tasks fail, etc.) if zammad is updated together with elasticsearch.
This commit is contained in:
parent
ad19b532a9
commit
fb8f02fa61
1 changed files with 1 additions and 1 deletions
|
@ -248,7 +248,7 @@ function setup_elasticsearch () {
|
|||
|
||||
yes | /usr/share/elasticsearch/bin/elasticsearch-plugin -s install ingest-attachment
|
||||
|
||||
if [ "${ES_CONNECTION}" == "http://127.0.0.1:9200" ]; then
|
||||
if [ "${ES_CONNECTION}" == "http://127.0.0.1:9200" ] || [ "${ES_CONNECTION}" == "http://localhost:9200" ]; then
|
||||
${INIT_CMD} restart elasticsearch
|
||||
else
|
||||
echo -e "\n It seems you're running an external Elasticsearch server on ${ES_CONNECTION}"
|
||||
|
|
Loading…
Reference in a new issue