Skip to content

Commit

Permalink
Merge pull request #46 from lingochamp/fix-web-interactive-port-bug
Browse files Browse the repository at this point in the history
fix the web interactive_port bug
  • Loading branch information
jbuchbinder committed Aug 26, 2014
2 parents 1a70366 + 79f0ba6 commit 19df1cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions recipes/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
end
end

xml_port = if node['ganglia']['enable_two_gmetads'] then
node['ganglia']['two_gmetads']['xml_port']
interactive_port = if node['ganglia']['enable_two_gmetads'] then
node['ganglia']['two_gmetads']['interactive_port']
else
node['ganglia']['gmetad']['xml_port']
node['ganglia']['gmetad']['interactive_port']
end
template "/etc/ganglia-webfrontend/conf.php" do
source "webconf.php.erb"
mode "0644"
variables( :xml_port => xml_port, :users => users.nil? ? '' : users )
variables( :interactive_port => interactive_port, :users => users.nil? ? '' : users )
end

service "apache2" do
Expand Down
2 changes: 1 addition & 1 deletion templates/default/webconf.php.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $conf['auth_system'] = '<%= node['ganglia']['web']['auth_system'] %>';
<% if node['ganglia']['enable_rrdcached'] %>
$conf['rrdcached_socket'] = "<%= node['ganglia']['rrdcached']['limited_socket'] %>";
<% end %>
$conf['ganglia_port'] = <%= @xml_port %>;
$conf['ganglia_port'] = <%= @interactive_port %>;
<% if node['ganglia']['web']['auth_system'] == 'enabled' %>
$acl = GangliaAcl::getInstance();
<% @users.each do |user| %>
Expand Down

0 comments on commit 19df1cb

Please sign in to comment.