Skip to content

Instantly share code, notes, and snippets.

@kapkaev
Forked from tobiasmcnulty/elasticsearch.conf
Created March 7, 2012 07:58
Show Gist options
  • Save kapkaev/1991790 to your computer and use it in GitHub Desktop.
Save kapkaev/1991790 to your computer and use it in GitHub Desktop.
upstart job for elastic search
# 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=/opt/elasticsearch
env ES_MIN_MEM=256m
env ES_MAX_MEM=2g
env DAEMON="${ES_HOME}/bin/elasticsearch"
env DATA_DIR="${ES_HOME}/data"
env CONFIG_DIR="${ES_HOME}/config"
env LOG_DIR="${ES_HOME}/logs"
console output
exec su -c "$DAEMON -f -Des.path.conf=$CONFIG_DIR -Des.path.home=$ES_HOME -Des.path.logs=$LOG_DIR -Des.path.data=$DATA_DIR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment