Skip to content

Instantly share code, notes, and snippets.

@hooopo
Forked from crofty/elasticsearch.conf
Created November 27, 2015 07:55
Show Gist options
  • Save hooopo/370948f61f20860ab388 to your computer and use it in GitHub Desktop.
Save hooopo/370948f61f20860ab388 to your computer and use it in GitHub Desktop.
Upstart for elasticsearch
# 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 JAVA_HOME=/usr/lib/jvm/java-7-oracle/bin/java
env LOG_DIR=/var/log/elasticsearch
env DATA_DIR=/var/lib/elasticsearch
env WORK_DIR=/tmp/elasticsearch
env CONFIG_DIR=/etc/elasticsearch
env DEFAULT_CONFIG=/etc/elasticsearch/elasticsearch.yml
env DAEMON=/usr/share/elasticsearch/bin/elasticsearch
console output
script
if [ -f /etc/default/elasticsearch ]; then
. /etc/default/elasticsearch
fi
su -s /bin/dash -c "$DAEMON -f -Des.default.config=$DEFAULT_CONFIG -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
@hooopo
Copy link
Author

hooopo commented Nov 29, 2015

👍

@hooopo
Copy link
Author

hooopo commented Nov 29, 2015

😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment