description "Upstart job for Elasticsearch" author "hvivani" start on filesystem or runlevel [2345] stop on shutdown #respawn unlimited times with 5 seconds time interval #respawn limit 0 5 respawn #service listening in a port and writing output to log file script exec /usr/share/elasticsearch/bin/elasticsearch -Des.default.path.conf=/etc/elasticsearch >> /mnt/var/log/elasticsearch.log end script pre-start script echo "[`date`] Elasticsearch Starting" >> /mnt/var/log/elasticsearch.log end script pre-stop script echo "[`date`] Elasticsearch Stopping" >> /mnt/var/log/elasticsearch.log end script