Skip to content

Instantly share code, notes, and snippets.

@arowla
Forked from rbscott/elasticsearch.conf
Last active August 29, 2015 14:01
Show Gist options
  • Save arowla/b57409d48f4839f9a72a to your computer and use it in GitHub Desktop.
Save arowla/b57409d48f4839f9a72a to your computer and use it in GitHub Desktop.
# ElasticSearch Service
description "ElasticSearch"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
respawn limit 10 5
env ES_HOME=/usr/share/elasticsearch
env ES_EBS_HOME=/home/fbopen/elasticsearch
env ES_CLASSPATH="${ES_CLASSPATH}:${ES_HOME}/lib/elasticsearch-1.2.0.jar:${ES_HOME}/lib/*:${ES_HOME}/lib/sigar/*"
env ES_MIN_MEM=256m
env ES_MAX_MEM=2g
env DATA_DIR="${ES_EBS_HOME}/data"
env CONFIG_DIR="${ES_EBS_HOME}/conf"
env LOG_DIR="${ES_EBS_HOME}/logs"
console output
script
if [ -f /etc/default/elasticsearch ]; then
. /etc/default/elasticsearch
fi
su -s /bin/dash -c "/usr/bin/elasticsearch -f -Des.path.conf=$CONFIG_DIR -Des.path.home=$ES_HOME -Des.path.logs=$LOG_DIR -Des.path.data=$DATA_DIR -Des.path.work=$WORK_DIR" elasticsearch
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment