Permalink
Browse files

metadata comes from node[:mongodb][<process_type>]

  • Loading branch information...
1 parent 0f01a92 commit d220382dfcbc399c69c46e6ceead2fa23aada7d5 @erkki committed May 11, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 libraries/mondogb_process.rb
@@ -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"
@@ -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

0 comments on commit d220382

Please sign in to comment.