From 197453a72fbb68cb1e839e1535b423e4ef086a51 Mon Sep 17 00:00:00 2001 From: Jamie Starke Date: Fri, 28 Nov 2014 13:40:51 -0800 Subject: [PATCH] Added run settings based on tarball Tarball versions of logstash don't seem to have a jar file. For some reason this doesn't seem to have been added to the agent run config --- templates/default/sv-logstash_agent-run.erb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/default/sv-logstash_agent-run.erb b/templates/default/sv-logstash_agent-run.erb index a624c0d..5225bbe 100644 --- a/templates/default/sv-logstash_agent-run.erb +++ b/templates/default/sv-logstash_agent-run.erb @@ -12,8 +12,16 @@ LOGSTASH_OPTS="$LOGSTASH_OPTS -vv" <% end -%> LOGSTASH_OPTS="$LOGSTASH_OPTS -l $LOGSTASH_HOME/log/<%= @options[:log_file] %>" export LOGSTASH_OPTS="$LOGSTASH_OPTS -w <%= @options[:workers] %>" -<% if @options[:supervisor_gid] -%> -HOME=$LOGSTASH_HOME exec chpst -u <%= @options[:user] %>:<%= @options[:supervisor_gid] %> java $JAVA_OPTS $GC_OPTS -jar $LOGSTASH_HOME/lib/logstash.jar $LOGSTASH_OPTS +<% if @options[:install_type] == 'tarball' -%> +<% if @options[:supervisor_gid] -%> +HOME=$LOGSTASH_HOME exec chpst -u <%= @options[:user] %>:<%= @options[:supervisor_gid] %> $LOGSTASH_HOME/bin/logstash $LOGSTASH_OPTS +<% else -%> +HOME=$LOGSTASH_HOME exec chpst -u <%= @options[:user] %> $LOGSTASH_HOME/bin/logstash $LOGSTASH_OPTS +<% end -%> <% else -%> +<% if @options[:supervisor_gid] -%> +HOME=$LOGSTASH_HOME exec chpst -u <%= @options[:user] %>:<%= @options[:supervisor_gid] %> java $JAVA_OPTS $GC_OPTS -jar $LOGSTASH_HOME/lib/logstash.jar $LOGSTASH_OPTS +<% else -%> HOME=$LOGSTASH_HOME exec chpst -u <%= @options[:user] %> java $JAVA_OPTS $GC_OPTS -jar $LOGSTASH_HOME/lib/logstash.jar $LOGSTASH_OPTS +<% end -%> <% end -%>