dae3541847
We need networking to be up before the indexer service starts or it dies a quiet death. Change-Id: Ic32196c59f8c418c9a29ccdd35706f2d4c87eb67
28 lines
677 B
Plaintext
28 lines
677 B
Plaintext
# logstash - indexer instance
|
|
#
|
|
# Adapted from http://cookbook.logstash.net/recipes/using-upstart/
|
|
|
|
description "logstash indexer instance"
|
|
|
|
start on (virtual-filesystems and started networking)
|
|
stop on runlevel [06]
|
|
|
|
# Respawn it if the process exits
|
|
respawn
|
|
respawn limit 5 30
|
|
|
|
# You need to chdir somewhere writable because logstash needs to unpack a few
|
|
# temporary files on startup.
|
|
chdir /opt/logstash
|
|
|
|
setuid logstash
|
|
|
|
script
|
|
JAVA_ARGS=''
|
|
if [ -f /etc/default/logstash-indexer ] ;
|
|
then
|
|
. /etc/default/logstash-indexer
|
|
fi
|
|
exec /usr/bin/java $JAVA_ARGS -jar logstash.jar agent -f /etc/logstash/indexer.conf --log /var/log/logstash/indexer.log
|
|
end script
|