Created
December 1, 2012 02:18
-
-
Save drewr/4180222 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "ElasticSearch" | |
start on (net-device-up | |
and local-filesystems | |
and runlevel [2345]) | |
stop on runlevel [016] | |
respawn limit 10 5 | |
env ES_HOME=/opt/es/es | |
env DATA_DIR=/opt/es/data | |
env MEMMIN=512m | |
env MEMMAX=1g | |
console log | |
script | |
if [ -f /etc/default/elasticsearch ]; then | |
. /etc/default/elasticsearch | |
fi | |
# memlock | |
ulimit -l unlimited | |
# nofiles | |
ulimit -n 64000 | |
cd $ES_HOME | |
exec setuidgid nobody \ | |
env ES_MIN_MEM=$MEMMIN \ | |
ES_MAX_MEM=$MEMMAX \ | |
bin/elasticsearch -f \ | |
-Des.path.data=$DATA_DIR | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment