Skip to content

Instantly share code, notes, and snippets.

@mbrownnycnyc
Last active March 4, 2016 21:40
Show Gist options
  • Save mbrownnycnyc/9d333a87464241dd6fab to your computer and use it in GitHub Desktop.
Save mbrownnycnyc/9d333a87464241dd6fab to your computer and use it in GitHub Desktop.
moloch upstart script for ElasticSearch from Google Groups post https://groups.google.com/forum/#!topic/moloch-fpc/ImhLjuN7RkM
description "Upstart configuration for ElasticSearch"
#copy /etc/init/moloch-elasticsearch.conf
# When to start the service
start on started network
# When to stop the service
stop on runlevel [016]
# Automatically restart the process if crashed
respawn
respawn limit 10 5
script
exec /data/moloch/bin/run_es.sh
end script
pre-stop script
exec curl -XPOST http://localhost:9200/_shutdown
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment