Skip to content

Commit

Permalink
metadata comes from node[:mongodb][<process_type>]
Browse files Browse the repository at this point in the history
  • Loading branch information
erkki committed May 11, 2011
1 parent 0f01a92 commit d220382
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/mondogb_process.rb
Expand Up @@ -40,7 +40,7 @@ def mongodb_process(name, variables = {})
init_variables = variables[:init] || {}
init_variables[:server_type] = name.to_sym

case node[:mongodb][:system_init]
case config[:system_init]
when "upstart"
template "/etc/init/#{service_name}.conf" do
source "mongodb.upstart.erb"
Expand Down Expand Up @@ -75,8 +75,8 @@ def mongodb_process(name, variables = {})
end

subscribes :restart, resources(:template => config[:config])
subscribes :restart, resources(:template => "/etc/init.d/#{service_name}") if node[:mongodb][:installed_from] == "src"
subscribes :restart, resources(:template => "/etc/init/#{service_name}.conf") if node[:mongodb][:installed_from] == "apt"
subscribes :restart, resources(:template => "/etc/init.d/#{service_name}") if config[:system_init] == 'sysv'
subscribes :restart, resources(:template => "/etc/init/#{service_name}.conf") if config[:system_init] == 'upstart'
end

logrotate "mongodb-#{service_name}" do
Expand Down

0 comments on commit d220382

Please sign in to comment.