# overrides for merb
namespace :merb do
# to start from cold boot:
# merb --user deploy --group users --daemonize --cluster-nodes 3 --port 4000 --adapter thin --environment production
# to stop merb:
# merb --graceful all
desc "Start Merb"
task :start do
# can't get the --user deploy and --group deploy to work with daemonize
run "merb --merb-root #{current_path} --daemonize --cluster-nodes #{merb_cluster_nodes} --port #{merb_start_port} --environment production --log #{current_path}/log/merb.log"
end
desc "Stop Merb"
task :stop do
run "merb --merb-root #{current_path} --graceful all"
end
desc "Restart Merb"
task :restart do
merb.stop
run "sleep 3" # to wait for merb to shut down
merb.start
end
end
namespace :deploy do
task :start do
merb.start
end
task :restart do
merb.restart
end
task :stop do
merb.stop
end
end