Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ A service wrapper execution for elasticsearch using [Java Service Wrapper](http:
Installation guide
==================

Simply place the `service` directory under the elasticsearch `bin` directory and edit the `elasticsearch.conf` file to point to the correct elasticsearch home path.
Simply edit the `elasticsearch.conf` file to point to the correct elasticsearch home path.

ElasticSearch can be run as a service using the `elasticsearch` script located under `bin/service` location. The script accepts a single parameter with the following values:

Expand Down Expand Up @@ -47,4 +47,4 @@ This requires a commercial license for Java Service Wrapper. Licenses are bound

Once you have your license information, paste the extra `wrapper.license.*` lines into the `elasticsearch.conf` file. Then download the corresponding windows x86 64 bit build of the JSW.

Copy `bin\wrapper.exe` to `bin\service\exec\elasticsearch-windows-x86-64.exe`, and `lib\wrapper.dll` and `lib\wrapper.jar` to `bin\service\lib` in your elasticsearch directory. Also make sure you have a 64-bit JRE installed. The service can then be installed and started as described above.
Place the `service` directory under the elasticsearch `bin` directory. Copy `bin\wrapper.exe` to `bin\service\exec\elasticsearch-windows-x86-64.exe`, and `lib\wrapper.dll` and `lib\wrapper.jar` to `bin\service\lib` in your elasticsearch directory. Also make sure you have a 64-bit JRE installed. The service can then be installed and started as described above.
14 changes: 7 additions & 7 deletions service/elasticsearch
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ while [ -h "$SCRIPT" ] ; do
fi
done

# determine elasticsearch home
ES_HOME=`dirname "$SCRIPT"`/../..
# locate JVM config file
ES_JAVA_CONF=`dirname "$SCRIPT"`/elasticsearch.conf

# make ELASTICSEARCH_HOME absolute
export ES_HOME=`cd $ES_HOME; pwd`
# get ELASTICSEARCH_HOME from JVM level config file
export ES_HOME=`cd $(grep '^set\.default\.ES_HOME=' $ES_JAVA_CONF | cut -d '=' -f 2); pwd`


# Application
APP_NAME="elasticsearch"
APP_LONG_NAME="ElasticSearch"
# Use the same application name in JVM config
APP_NAME="$(grep '^wrapper\.name=' $ES_JAVA_CONF | cut -d '=' -f 2)"
APP_LONG_NAME="$(grep '^wrapper\.displayname=' $ES_JAVA_CONF | cut -d '=' -f 2)"

# Wrapper
WRAPPER_CMD="$ES_HOME/bin/service/exec/elasticsearch"
Expand Down