From fb8f02fa612af057c7bafae7ddce33a2b4cf47d2 Mon Sep 17 00:00:00 2001 From: Kevin Olbrich Date: Thu, 13 Dec 2018 11:05:07 +0100 Subject: [PATCH] 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. --- contrib/packager.io/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/packager.io/functions b/contrib/packager.io/functions index 92fdcd786..fdd391aa9 100644 --- a/contrib/packager.io/functions +++ b/contrib/packager.io/functions @@ -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}"