Skip to content

Instantly share code, notes, and snippets.

@pakMann
Forked from andrewvc/elasticsearch.conf
Created January 7, 2018 15:46
Show Gist options
  • Select an option

  • Save pakMann/82f56928b2a49411baf9fcf03f4bd618 to your computer and use it in GitHub Desktop.

Select an option

Save pakMann/82f56928b2a49411baf9fcf03f4bd618 to your computer and use it in GitHub Desktop.
Upstart script for elasticsearch on ubuntu.... that actually works. Install the deb, and then run `sudo update-rc.d elasticsearch remove -f` to disable the init script.
# ElasticSearch upstart script
description "ElasticSearch service"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
respawn
respawn limit 10 30
# NB: Upstart scripts do not respect
# /etc/security/limits.conf, so the open-file limits
# settings need to be applied here.
limit nofile 32000 32000
setuid elasticsearch
setgid elasticsearch
exec /usr/share/elasticsearch/bin/elasticsearch -f -Des.default.config=/etc/elasticsearch/elasticsearch.yml -Des.default.path.home=/usr/share/elasticsearch/ -Des.default.path.logs=/var/log/elasticsearch/ -Des.default.path.data=/var/lib/elasticsearch/ -Des.default.path.work=/tmp/elasticsearch -Des.default.path.conf=/etc/elasticsearch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment