rework script to handle path with spaces

use service id for pid name
disable filtering on *.exe (caused corruption)
rename exe names and add more options to .bat
start/stop operations are now supported (and expected to be called) by service.bat
add more variables from the env to customize default behavior prior to installing the service
add manager option
fixes regarding batch flow
specify service id in description
minor readability improvement
include .exe only in ZIP archive
rename x64 service id to make it work out of the box
add elasticsearch as a service for Windows platforms
based on Apace Commons Daemon
supports both x64 and x86
This commit is contained in:
Costin Leau 2013-09-16 12:57:55 +03:00
parent 85fcefc60d
commit 08bf131899
6 changed files with 20 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/service.bat Normal file

Binary file not shown.

12
pom.xml
View File

@ -518,6 +518,16 @@
<resource> <resource>
<directory>${basedir}/bin</directory> <directory>${basedir}/bin</directory>
<filtering>true</filtering> <filtering>true</filtering>
<excludes>
<exclude>*.exe</exclude>
</excludes>
</resource>
<resource>
<directory>${basedir}/bin</directory>
<filtering>false</filtering>
<includes>
<include>*.exe</include>
</includes>
</resource> </resource>
</resources> </resources>
</configuration> </configuration>
@ -609,7 +619,7 @@
<!-- use the filtered one from the resources plugin --> <!-- use the filtered one from the resources plugin -->
<src>${project.build.directory}/bin</src> <src>${project.build.directory}/bin</src>
<type>directory</type> <type>directory</type>
<excludes>*.bat, .DS_Store</excludes> <excludes>*.bat, .DS_Store, *.exe</excludes>
<mapper> <mapper>
<type>perm</type> <type>perm</type>
<prefix>/usr/share/elasticsearch/bin</prefix> <prefix>/usr/share/elasticsearch/bin</prefix>

View File

@ -16,6 +16,15 @@
<includes> <includes>
<include>elasticsearch.bat</include> <include>elasticsearch.bat</include>
<include>plugin.bat</include> <include>plugin.bat</include>
<include>service.bat</include>
</includes>
</fileSet>
<fileSet>
<filtered>false</filtered>
<directory>bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>*.exe</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>