diff options
author | Mark Felder <feld@FreeBSD.org> | 2018-02-22 23:03:41 +0000 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2018-02-22 23:03:41 +0000 |
commit | dae3775e5b9473c366dd69896a7aa13f6e9fbfe4 (patch) | |
tree | d84a2760c568ff3f3df5e94f7c6f83c552e9020f | |
parent | b2df79a202d090478a89f9eaf5d95a51478c3532 (diff) |
Notes
-rw-r--r-- | textproc/elasticsearch5/Makefile | 5 | ||||
-rw-r--r-- | textproc/elasticsearch5/files/elasticsearch.in | 49 |
2 files changed, 4 insertions, 50 deletions
diff --git a/textproc/elasticsearch5/Makefile b/textproc/elasticsearch5/Makefile index 4ede31eee3f7..0815d62eb44f 100644 --- a/textproc/elasticsearch5/Makefile +++ b/textproc/elasticsearch5/Makefile @@ -3,7 +3,7 @@ PORTNAME= elasticsearch PORTVERSION= 5.3.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= textproc java devel MASTER_SITES= https://artifacts.elastic.co/downloads/${PORTNAME}/ \ http://mirrors.rit.edu/zi/ @@ -51,7 +51,8 @@ ELASTIC_LOGDIR= /var/log/elasticsearch SUB_LIST= SEARCHUSER=${SEARCHUSER} \ SEARCHGROUP=${SEARCHGROUP} \ - PORTVERSION=${PORTVERSION} + PORTVERSION=${PORTVERSION} \ + JAVA=${JAVA} SUB_FILES= pkg-message PLIST_SUB+= SEARCHUSER=${SEARCHUSER} \ SEARCHGROUP=${SEARCHGROUP} \ diff --git a/textproc/elasticsearch5/files/elasticsearch.in b/textproc/elasticsearch5/files/elasticsearch.in index 925a3066dc37..2141a5edb8ff 100644 --- a/textproc/elasticsearch5/files/elasticsearch.in +++ b/textproc/elasticsearch5/files/elasticsearch.in @@ -36,12 +36,11 @@ load_rc_config ${name} required_files="${elasticsearch_config}/elasticsearch.yml" _pidprefix=/var/run/elasticsearch pidfile=${_pidprefix}.pid +procname=%%JAVA%% extra_commands="console status" console_cmd=elasticsearch_console start_precmd=elasticsearch_precmd -status_cmd=elasticsearch_status -stop_cmd=elasticsearch_stop command=%%PREFIX%%/lib/elasticsearch/bin/elasticsearch command_args="-d --pidfile=${pidfile} -Epath.conf=${elasticsearch_config}" @@ -59,52 +58,6 @@ elasticsearch_console() run_rc_command "start" } -elasticsearch_stop() -{ - rc_pid=$(elasticsearch_check_pidfile $pidfile) - - if [ -z "$rc_pid" ]; then - [ -n "$rc_fast" ] && return 0 - echo "${name} not running? (check $pidfile)." - return 1 - fi - - echo "Stopping ${name}." - kill $sig_stop ${rc_pid} - wait_for_pids ${rc_pid} -} - -elasticsearch_status() -{ - rc_pid=$(elasticsearch_check_pidfile $pidfile) - - if [ -z "$rc_pid" ]; then - [ -n "$rc_fast" ] && return 0 - echo "${name} not running? (check $pidfile)." - return 1 - fi - echo "${name} is running as pid ${rc_pid}." -} - -elasticsearch_check_pidfile() -{ - _pidfile=$1 - if [ -z "$_pidfile" ]; then - err 3 'USAGE: elasticsearch_check_pidfile pidfile' - fi - if [ ! -f $_pidfile ]; then - debug "pid file ($_pidfile): not readable." - return - fi - read _pid _junk < $_pidfile - if [ -z "$_pid" ]; then - debug "pid file ($_pidfile): no pid in file." - return - fi - if [ -n "`%%PREFIX%%/bin/jps -l | grep -e "^$_pid"`" ]; then - echo -n $_pid - fi -} if [ -n "$2" ]; then profile="$2" if [ "x${elasticsearch_profiles}" != "x" ]; then |