Skip to content

Instantly share code, notes, and snippets.

@timconradinc
Created May 24, 2013 03:55
Show Gist options
  • Select an option

  • Save timconradinc/5641200 to your computer and use it in GitHub Desktop.

Select an option

Save timconradinc/5641200 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
respawn limit 10 30
limit nofile 55000 55000
console output
env ES_HOME=/g/elasticsearch/home/
env CONFIG_DIR=${ES_HOME}/config/
env DAEMON="${ES_HOME}/bin/elasticsearch"
env DATA_DIR=/g/elasticsearch/
env WORK_DIR=/g/elasticsearch/work/
env ES_MIN_MEM=20g
env ES_MAX_MEM=20g
script
#exec 2>>/dev/.initramfs/elasticsearch.log
#set -x
ulimit -n 60000
ulimit -l unlimited
if [ -f /etc/default/elasticsearch ]; then
. /etc/default/elasticsearch
fi
# su -s /bin/dash -c "/g/elasticsearch/home/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 -Des.max-open-files=true" es
su -s /bin/dash -c "/g/elasticsearch/home/bin/elasticsearch -f -Des.max-open-files=true" es
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment