From b03c8073688a1a93b04cc207aa4345c5f858c059 Mon Sep 17 00:00:00 2001 From: gfyoung Date: Thu, 15 Sep 2016 09:53:44 -0400 Subject: [PATCH] Rename service.bat to elasticsearch-service.bat (#20496) Closes gh-17528. --- .../org/elasticsearch/bootstrap/Elasticsearch.java | 3 ++- .../bin/{service.bat => elasticsearch-service.bat} | 2 +- docs/reference/setup/install/windows.asciidoc | 14 +++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) rename distribution/src/main/resources/bin/{service.bat => elasticsearch-service.bat} (99%) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java b/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java index 046f4a2b4a6..b4ec024b9e8 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java @@ -123,7 +123,8 @@ class Elasticsearch extends SettingCommand { * * http://commons.apache.org/proper/commons-daemon/procrun.html * - * NOTE: If this method is renamed and/or moved, make sure to update service.bat! + * NOTE: If this method is renamed and/or moved, make sure to + * update elasticsearch-service.bat! */ static void close(String[] args) throws IOException { Bootstrap.stop(); diff --git a/distribution/src/main/resources/bin/service.bat b/distribution/src/main/resources/bin/elasticsearch-service.bat similarity index 99% rename from distribution/src/main/resources/bin/service.bat rename to distribution/src/main/resources/bin/elasticsearch-service.bat index 1d62d81e764..609b8bda846 100644 --- a/distribution/src/main/resources/bin/service.bat +++ b/distribution/src/main/resources/bin/elasticsearch-service.bat @@ -75,7 +75,7 @@ echo Unknown option "%SERVICE_CMD%" :displayUsage echo. -echo Usage: service.bat install^|remove^|start^|stop^|manager [SERVICE_ID] +echo Usage: elasticsearch-service.bat install^|remove^|start^|stop^|manager [SERVICE_ID] goto:eof :doStart diff --git a/docs/reference/setup/install/windows.asciidoc b/docs/reference/setup/install/windows.asciidoc index ef0c5f2a71f..5fbb147edf4 100644 --- a/docs/reference/setup/install/windows.asciidoc +++ b/docs/reference/setup/install/windows.asciidoc @@ -2,7 +2,7 @@ === Install Elasticsearch on Windows Elasticsearch can be installed on Windows using the `.zip` package. This -comes with a `service.bat` command which will setup Elasticsearch to run as a +comes with a `elasticsearch-service.bat` command which will setup Elasticsearch to run as a service. The latest stable version of Elasticsearch can be found on the @@ -13,7 +13,7 @@ link:/downloads/past-releases[Past Releases page]. [[install-windows]] ==== Download and install the `.zip` package -Download the `.zip` archive for Elastisearch v{version} from: https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/{version}/elasticsearch-{version}.zip +Download the `.zip` archive for Elasticsearch v{version} from: https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/{version}/elasticsearch-{version}.zip Unzip it with your favourite unzip tool. This will create a folder called +elasticsearch-{version}+, which we will refer to as `%ES_HOME%`. In a terminal @@ -65,7 +65,7 @@ include::check-running.asciidoc[] Elasticsearch can be installed as a service to run in the background or start automatically at boot time without any user interaction. This can be achieved -through the `service.bat` script in the `bin\` folder which allows one to +through the `elasticsearch-service.bat` script in the `bin\` folder which allows one to install, remove, manage or configure the service and potentially start and stop the service, all from the command-line. @@ -73,7 +73,7 @@ stop the service, all from the command-line. -------------------------------------------------- c:\elasticsearch-{version}{backslash}bin>service -Usage: service.bat install|remove|start|stop|manager [SERVICE_ID] +Usage: elasticsearch-service.bat install|remove|start|stop|manager [SERVICE_ID] -------------------------------------------------- The script requires one parameter (the command to execute) followed by an @@ -170,18 +170,18 @@ The Elasticsearch service can be configured prior to installation by setting the The timeout in seconds that procrun waits for service to exit gracefully. Defaults to `0`. -NOTE: At its core, `service.bat` relies on http://commons.apache.org/proper/commons-daemon/[Apache Commons Daemon] project +NOTE: At its core, `elasticsearch-service.bat` relies on http://commons.apache.org/proper/commons-daemon/[Apache Commons Daemon] project to install the service. Environment variables set prior to the service installation are copied and will be used during the service lifecycle. This means any changes made to them after the installation will not be picked up unless the service is reinstalled. NOTE: On Windows, the <> can be configured as for any other Elasticsearch installation when running Elasticsearch from the command line, or when installing Elasticsearch as a service for the first time. To adjust the heap size for an already installed service, -use the service manager: `bin\service.bat manager`. +use the service manager: `bin\elasticsearch-service.bat manager`. Using the Manager GUI:: -It is also possible to configure the service after it's been installed using the manager GUI (`elasticsearch-service-mgr.exe`), which offers insight into the installed service, including its status, startup type, JVM, start and stop settings amongst other things. Simply invoking `service.bat manager` from the command-line will open up the manager window: +It is also possible to configure the service after it's been installed using the manager GUI (`elasticsearch-service-mgr.exe`), which offers insight into the installed service, including its status, startup type, JVM, start and stop settings amongst other things. Simply invoking `elasticsearch-service.bat manager` from the command-line will open up the manager window: image::images/service-manager-win.png["Windows Service Manager GUI",align="center"]