generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb in nirvdrum-rubber-1.1.7 vs generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb in nirvdrum-rubber-2.0.0.rails3.beta6
- old
+ new
@@ -12,12 +12,12 @@
# configure barfs as postfix not configured yet)
desc <<-DESC
Reconfigures munin
DESC
task :custom_install do
- rubber.run_script 'setup_munin_plugins', <<-ENDSCRIPT
- munin-node-configure --shell --remove-also > /tmp/setup-munin-plugins
+ rubber.sudo_script 'setup_munin_plugins', <<-ENDSCRIPT
+ munin-node-configure --shell --remove-also > /tmp/setup-munin-plugins 2> /dev/null || true
sh /tmp/setup-munin-plugins
ENDSCRIPT
restart
end
@@ -25,15 +25,15 @@
# before "deploy:start", "rubber:munin:start"
# after "deploy:restart", "rubber:munin:restart"
desc "Start munin system monitoring"
task :start do
- run "/etc/init.d/munin-node start"
+ rsudo "service munin-node start"
end
desc "Stop munin system monitoring"
- task :stop, :on_error => :continue do
- run "/etc/init.d/munin-node stop"
+ task :stop do
+ rsudo "service munin-node stop; exit 0"
end
desc "Restart munin system monitoring"
task :restart do
stop