Skip to content

Instantly share code, notes, and snippets.

@vanatteveldt
Forked from rbscott/elasticsearch.conf
Created October 31, 2013 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanatteveldt/7246123 to your computer and use it in GitHub Desktop.
Save vanatteveldt/7246123 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/home
env ES_MIN_MEM=256m
env ES_MAX_MEM=2g
env DAEMON="${ES_HOME}/bin/elasticsearch"
env DATA_DIR=/data/elasticsearch/data
env CONFIG_DIR=/etc/elasticsearch
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