Add support for Elasticsearch 5.x
* Use log4j2.properties instead of logging.yml * Add jvm.options * Use bootstrap.memory_lock instead of bootstrap.mlockall * Get rid of work directory * Executable does not accept `-D` anymore, replace with `-E` and `-p` * Get rid of 5.x default (file)s
This commit is contained in:
parent
56837b0627
commit
523270405e
9 changed files with 218 additions and 5 deletions
|
|
@ -104,7 +104,11 @@ fi
|
|||
# Define other required variables
|
||||
PID_FILE="$PID_DIR/$NAME.pid"
|
||||
DAEMON={{es_home}}/bin/elasticsearch
|
||||
{% if es_version | version_compare('2.0', '<=') %}
|
||||
DAEMON_OPTS="-d -p $PID_FILE --default.path.home=$ES_HOME --default.path.logs=$LOG_DIR --default.path.data=$DATA_DIR --default.path.conf=$CONF_DIR"
|
||||
{% else %}
|
||||
DAEMON_OPTS="-d -p $PID_FILE -Edefault.path.home=$ES_HOME -Edefault.path.logs=$LOG_DIR -Edefault.path.data=$DATA_DIR -Edefault.path.conf=$CONF_DIR"
|
||||
{% endif %}
|
||||
|
||||
export ES_HEAP_SIZE
|
||||
export ES_HEAP_NEWSIZE
|
||||
|
|
|
|||
|
|
@ -116,7 +116,11 @@ start() {
|
|||
cd $ES_HOME
|
||||
echo -n $"Starting $prog: "
|
||||
# if not running, start it up here, usually something like "daemon $exec"
|
||||
{% if es_version | version_compare('2.0', '<=') %}
|
||||
daemon --user $ES_USER --pidfile $pidfile $exec -p $pidfile -d -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.conf=$CONF_DIR
|
||||
{% else %}
|
||||
daemon --user $ES_USER --pidfile $pidfile $exec -p $pidfile -d -Edefault.path.home=$ES_HOME -Edefault.path.logs=$LOG_DIR -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=$CONF_DIR
|
||||
{% endif %}
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && touch $lockfile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue