end
# Define the user for running and stopping server sub-proceses (Mongrel, etc.)
-# set :runner, :user
+set :runner, :neil
-# As we're not running any other server processes (FastCGI, Mongrel, etc.),
-# we don't need to start and stop them.
+## As we're not running any other server processes (FastCGI, Mongrel, etc.),
+## we don't need to start and stop them.
+#namespace :deploy do
+# [:start, :stop, :restart].each do |t|
+# desc "#{t} task is a no-op with mod_rails"
+# task t, :roles => :app do ; end
+# end
+#end
+
+# Custom tasks for starting and restarting Mongrel cluster
namespace :deploy do
- [:start, :stop, :restart].each do |t|
- desc "#{t} task is a no-op with mod_rails"
- task t, :roles => :app do ; end
+ desc "start the mongrel cluster"
+ task :start, :roles => :app do
+ sudo "/usr/bin/mongrel_cluster_ctl start"
+ end
+
+ desc "stop the mongrel cluster"
+ task :stop, :roles => :app do
+ sudo "/usr/bin/mongrel_cluster_ctl stop"
end
-end
\ No newline at end of file
+
+ desc "restart the mongrel cluster"
+ task :restart, :roles => :app do
+ sudo "/usr/bin/mongrel_cluster_ctl restart"
+ end
+end