Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
Fixed FC035.
Browse files Browse the repository at this point in the history
  • Loading branch information
hectcastro committed Aug 24, 2012
1 parent 55a9dea commit 364b839
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
mode "0644"
source "statsd.conf.erb"
variables(
:log_file => node["statsd"]["log_file"]
:log_file => node["statsd"]["log_file"],
:platform_version => node["platform_version"].to_f
)
end

Expand Down
4 changes: 2 additions & 2 deletions templates/default/statsd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ respawn
respawn limit 5 30

chdir /usr/share/statsd
<% unless node['platform_version'].to_f < 11.10 -%>
<% unless @platform_version < 11.10 -%>
setuid statsd
<% end %>

script
<% if node['platform_version'].to_f < 11.10 -%>
<% if @platform_version < 11.10 -%>
exec start-stop-daemon --start --chuid statsd --exec /usr/local/bin/node /usr/share/statsd/stats.js /etc/statsd/config.js 2>&1 >> <%= @log_file %>
<% else -%>
exec /usr/local/bin/node /usr/share/statsd/stats.js /etc/statsd/config.js 2>&1 >> <%= @log_file %>
Expand Down

0 comments on commit 364b839

Please sign in to comment.