Permalink
Browse files

Put back old Restart behavior as the StopStart command.

  • Loading branch information...
1 parent dd7fb58 commit e1ddc69db9662e5b24497c4c283e267a81288318 @chuyeow committed Dec 3, 2008
Showing with 21 additions and 1 deletion.
  1. +21 −1 projects/mongrel_cluster/lib/mongrel_cluster/init.rb
@@ -289,7 +289,27 @@ def check_wait(wait_time = 2)
@force = false
end
end
-
+
+ # Stops all mongrel processes, then starts them.
+ class StopStart < GemPlugin::Plugin "/commands"
+ include ExecBase
+
+ def configure
+ options [
+ ['-C', '--config PATH', "Path to cluster configuration file", :@config_file, "config/mongrel_cluster.yml"],
+ ['-f', '--force', "Force the shutdown.", :@force, false],
+ ['-v', '--verbose', "Print all called commands and output.", :@verbose, false],
+ ['', '--clean', "Call stop and start with --clean", :@clean, false],
+ ['', '--only PORT', "Port number of cluster member", :@only, nil]
+ ]
+ end
+
+ def run
+ stop
+ start
+ end
+ end
+
class Configure < GemPlugin::Plugin "/commands"
include ExecBase

0 comments on commit e1ddc69

Please sign in to comment.