Skip to content

Commit

Permalink
fix for #71
Browse files Browse the repository at this point in the history
  • Loading branch information
vkhatri committed Dec 18, 2016
1 parent eb01715 commit e1abf2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions recipes/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
service_action = node['filebeat']['disable_service'] ? [:disable, :stop] : [:enable, :nothing]

if node['filebeat']['service']['init_style'] == 'runit'
runit_cmd = "/usr/share/filebeat/bin/filebeat -c #{node['filebeat']['conf_file']} -path.home /usr/share/filebeat -path.config #{node['filebeat']['conf_dir']} -path.data /var/lib/filebeat -path.logs /var/log/filebeat"
runit_service 'filebeat' do
options(
'user' => 'root',
'conf_path' => node['filebeat']['conf_file'],
'binary_path' => '/usr/bin/filebeat'
'cmd' => runit_cmd
)
default_logger true
action service_action
Expand Down
2 changes: 1 addition & 1 deletion templates/default/sv-filebeat-run.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
exec 2>&1
exec chpst -u <%= @options['user'] %> <%= @options['binary_path'] %> -c <%= @options['conf_path'] %>
exec chpst -u <%= @options['user'] %> <%= @options['cmd'] %>

0 comments on commit e1abf2c

Please sign in to comment.