From dbf4e7e348c1914ca7567e34d5781334a55db7ca Mon Sep 17 00:00:00 2001 From: tj Date: Fri, 25 Mar 2016 15:28:02 +0000 Subject: Update to 1.7.5 Changes: https://www.elastic.co/downloads/past-releases/elasticsearch-1-7-5 PR: 206844 --- textproc/elasticsearch/Makefile | 2 +- textproc/elasticsearch/distinfo | 4 ++-- textproc/elasticsearch/files/elasticsearch.in | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/textproc/elasticsearch/Makefile b/textproc/elasticsearch/Makefile index c761341..eb16d81 100644 --- a/textproc/elasticsearch/Makefile +++ b/textproc/elasticsearch/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= elasticsearch -PORTVERSION= 1.7.4 +PORTVERSION= 1.7.5 CATEGORIES= textproc java devel MASTER_SITES= http://download.elasticsearch.org/${PORTNAME}/${PORTNAME}/ \ http://mirrors.rit.edu/zi/ diff --git a/textproc/elasticsearch/distinfo b/textproc/elasticsearch/distinfo index 7ff8338..37cc661 100644 --- a/textproc/elasticsearch/distinfo +++ b/textproc/elasticsearch/distinfo @@ -1,2 +1,2 @@ -SHA256 (elasticsearch-1.7.4.tar.gz) = 395f3417c26a6b36125f6a062c1129b454a961efea09151c692adc63562e5a94 -SIZE (elasticsearch-1.7.4.tar.gz) = 28510433 +SHA256 (elasticsearch-1.7.5.tar.gz) = 0aa58947d66b487488e86059352deb7c6cab5da4accdff043cce9fed7c3d2fa7 +SIZE (elasticsearch-1.7.5.tar.gz) = 28487351 diff --git a/textproc/elasticsearch/files/elasticsearch.in b/textproc/elasticsearch/files/elasticsearch.in index 8c646f3..fa13c31 100644 --- a/textproc/elasticsearch/files/elasticsearch.in +++ b/textproc/elasticsearch/files/elasticsearch.in @@ -73,6 +73,13 @@ command_args="-f %%LOCALBASE%%/bin/java -Des.pidfile=${pidfile} ${elasticsearch_ elasticsearch_precmd() { + rc_pid=$(elasticsearch_check_pidfile $pidfile) + + if [ -n "$rc_pid" ]; then + [ -n "$rc_fast" ] && return 0 + echo "${name} is already running: $rc_pid" + return 1 + fi touch ${pidfile} chown ${elasticsearch_user}:${elasticsearch_group} ${pidfile} /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 750 ${elasticsearch_tmp} @@ -82,6 +89,13 @@ elasticsearch_precmd() elasticsearch_console() { + rc_pid=$(elasticsearch_check_pidfile $pidfile) + + if [ -n "$rc_pid" ]; then + [ -n "$rc_fast" ] && return 0 + echo "${name} is already running: $rc_pid" + return 1 + fi %%LOCALBASE%%/bin/java -Des.foreground=yes ${elasticsearch_props} ${java_options} org.elasticsearch.bootstrap.Elasticsearch } @@ -127,7 +141,7 @@ elasticsearch_check_pidfile() debug "pid file ($_pidfile): no pid in file." return fi - if [ -n "`%%LOCALBASE%%/bin/jps -l | grep -e "^$_pid"`" ]; then + if [ -n "`/usr/bin/su -m ${elasticsearch_user} -c '%%LOCALBASE%%/bin/jps -l' | grep -e "^$_pid"`" ]; then echo -n $_pid fi } -- cgit v1.1