From 1b2a275598399bda3a5cdd49f1914d6e5ab73b37 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Sat, 20 Jan 2018 17:06:43 +0300 Subject: [PATCH] fix --- run-community-server.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/run-community-server.sh b/run-community-server.sh index c4d8441..44d41e5 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -790,16 +790,6 @@ if [ "${MYSQL_SERVER_EXTERNAL}" == "true" ]; then rm -f "${ONLYOFFICE_GOD_DIR}"/mysql.god; fi -#configure elasticsearch -service elasticsearch stop -/usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment | echo y -mkdir -p "$LOG_DIR/Index" -mkdir -p "$ONLYOFFICE_DATA_DIR/Index" -chown -R elasticsearch:elasticsearch "$ONLYOFFICE_DATA_DIR/Index" -chown -R elasticsearch:elasticsearch "$LOG_DIR/Index" -sed 's,#path.data: /path/to/data,path.data: '"${ONLYOFFICE_DATA_DIR}"'/Index/,' -i "/etc/elasticsearch/elasticsearch.yml" -sed 's,#path.logs: /path/to/logs,path.logs: '"${LOG_DIR}"'/Index/,' -i "/etc/elasticsearch/elasticsearch.yml" -service elasticsearch start if [ "${ONLYOFFICE_MODE}" == "SERVICES" ]; then service nginx stop @@ -842,6 +832,17 @@ else chown -R onlyoffice:onlyoffice ${ONLYOFFICE_DATA_DIR} fi + #configure elasticsearch +service elasticsearch stop +/usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment | echo y +mkdir -p "$LOG_DIR/Index" +mkdir -p "$ONLYOFFICE_DATA_DIR/Index" +chown -R elasticsearch:elasticsearch "$ONLYOFFICE_DATA_DIR/Index" +chown -R elasticsearch:elasticsearch "$LOG_DIR/Index" +sed 's,#path.data: /path/to/data,path.data: '"${ONLYOFFICE_DATA_DIR}"'/Index/,' -i "/etc/elasticsearch/elasticsearch.yml" +sed 's,#path.logs: /path/to/logs,path.logs: '"${LOG_DIR}"'/Index/,' -i "/etc/elasticsearch/elasticsearch.yml" +service elasticsearch start + for serverID in $(seq 1 ${ONLYOFFICE_MONOSERVE_COUNT}); do index=$serverID;