Skip to content

Instantly share code, notes, and snippets.

@rbrto
Created February 24, 2017 18:00
Show Gist options
  • Select an option

  • Save rbrto/cfc8c162ad4bac619eda3bb991ee94a6 to your computer and use it in GitHub Desktop.

Select an option

Save rbrto/cfc8c162ad4bac619eda3bb991ee94a6 to your computer and use it in GitHub Desktop.
ElasticSearch Systemd file
#Developer : Anshul Patel
#Put the file in /etc/systemd/system
#Make sure that the elasticsearch and run directory have permission of appropriate user
#In order to start it during boot, sudo systemctl enable elasticsearch
[Unit]
Description=ElasticSearch Service
After=network.target
[Service]
ExecStart=/usr/local/bin/elasticsearch/bin/elasticsearch
PIDFile=/usr/local/bin/elasticsearch/run/elasticsearch.pid
User=elasticsearch
Type=simple
Restart=always
[Install]
WantedBy=default.target
@edo248
Copy link
Copy Markdown

edo248 commented Oct 29, 2018

Thanks. Worked like charm!

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