diff options
Diffstat (limited to 'textproc/elasticsearch6/files')
-rw-r--r-- | textproc/elasticsearch6/files/elasticsearch.in | 15 | ||||
-rw-r--r-- | textproc/elasticsearch6/files/patch-config_elasticsearch.yml | 12 | ||||
-rw-r--r-- | textproc/elasticsearch6/files/patch-config_jvm.options | 11 |
3 files changed, 23 insertions, 15 deletions
diff --git a/textproc/elasticsearch6/files/elasticsearch.in b/textproc/elasticsearch6/files/elasticsearch.in index d394d9c764f1..54ad8138ad5d 100644 --- a/textproc/elasticsearch6/files/elasticsearch.in +++ b/textproc/elasticsearch6/files/elasticsearch.in @@ -17,8 +17,6 @@ # Set it to required group. # elasticsearch_config (path): Set to %%PREFIX%%/etc/elasticsearch/elasticsearch.yml by default. # Set it to the config file location. -# elasticsearch_tmp (path): Set to /var/tmp/elasticsearch by default. -# Set it to the path to be used for temp files. # . /etc/rc.subr @@ -31,7 +29,6 @@ load_rc_config ${name} : ${elasticsearch_user=elasticsearch} : ${elasticsearch_group=elasticsearch} : ${elasticsearch_config=%%PREFIX%%/etc/elasticsearch} -: ${elasticsearch_tmp=/var/tmp/elasticsearch} required_files="${elasticsearch_config}/elasticsearch.yml" _pidprefix=/var/run/elasticsearch @@ -42,12 +39,13 @@ extra_commands="console status" console_cmd=elasticsearch_console start_precmd=elasticsearch_precmd command=%%PREFIX%%/lib/elasticsearch/bin/elasticsearch -command_args="-d --pidfile=${pidfile} -Epath.conf=${elasticsearch_config}" +command_args="-d --pidfile=${pidfile}" + +export ES_PATH_CONF=${elasticsearch_config} elasticsearch_precmd() { /usr/bin/install -o ${elasticsearch_user} -g ${elasticsearch_group} /dev/null ${pidfile} - /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 755 ${elasticsearch_tmp} /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 755 /var/db/elasticsearch /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 755 /var/log/elasticsearch } @@ -66,15 +64,12 @@ if [ -n "$2" ]; then echo "You must define a configuration (elasticsearch_${profile}_config)" exit 1 fi + export ES_PATH_CONF=${elasticsearch_config} required_files="${elasticsearch_config}/elasticsearch.yml" required_files="${elasticsearch_config}/jvm.options" eval elasticsearch_enable="\${elasticsearch_${profile}_enable:-${elasticsearch_enable}}" - eval elasticsearch_tmp="\${elasticsearch_${profile}_args:-${elasticsearch_tmp}}" pidfile="${_pidprefix}.${profile}.pid" - if [ -e ${elasticsearch_config}/jvm.options ]; then - export ES_JVM_OPTIONS=${elasticsearch_config}/jvm.options - fi - command_args="-d --pidfile=${pidfile} -Epath.conf=${elasticsearch_config}" + command_args="-d --pidfile=${pidfile}" echo "===> elasticsearch profile: ${profile}" else echo "$0: extra argument ignored" diff --git a/textproc/elasticsearch6/files/patch-config_elasticsearch.yml b/textproc/elasticsearch6/files/patch-config_elasticsearch.yml index d44fa1d5a675..f61a04c32b9a 100644 --- a/textproc/elasticsearch6/files/patch-config_elasticsearch.yml +++ b/textproc/elasticsearch6/files/patch-config_elasticsearch.yml @@ -1,13 +1,15 @@ ---- config/elasticsearch.yml.orig 2018-02-06 00:13:22 UTC +--- config/elasticsearch.yml.orig 2018-02-16 18:57:55 UTC +++ config/elasticsearch.yml -@@ -35,6 +35,10 @@ +@@ -31,10 +31,12 @@ + # Path to directory where to store the data (separate multiple locations by comma): + # + #path.data: /path/to/data ++path.data: /var/db/elasticsearch + # # Path to log files: # #path.logs: /path/to/logs +path.logs: /var/log/elasticsearch -+# -+# Path to scripts dir: -+path.scripts: /usr/local/libexec/elasticsearch # # ----------------------------------- Memory ----------------------------------- # diff --git a/textproc/elasticsearch6/files/patch-config_jvm.options b/textproc/elasticsearch6/files/patch-config_jvm.options new file mode 100644 index 000000000000..3e259c0b1315 --- /dev/null +++ b/textproc/elasticsearch6/files/patch-config_jvm.options @@ -0,0 +1,11 @@ +--- config/jvm.options.orig 2018-03-01 23:04:45 UTC ++++ config/jvm.options +@@ -87,7 +87,7 @@ + 8:-XX:+PrintGCDateStamps + 8:-XX:+PrintTenuringDistribution + 8:-XX:+PrintGCApplicationStoppedTime +-8:-Xloggc:logs/gc.log ++8:-Xloggc:${ES_TMPDIR}/gc.log + 8:-XX:+UseGCLogFileRotation + 8:-XX:NumberOfGCLogFiles=32 + 8:-XX:GCLogFileSize=64m |