bin/mack_ring_server in mack-0.5.0 vs bin/mack_ring_server in mack-0.5.5
- old
+ new
@@ -1,10 +1,28 @@
#!/usr/local/bin/ruby
require 'rubygems'
require 'daemons'
require 'rinda/ring'
require 'rinda/tuplespace'
-require 'fileutils'
+require 'fileutils'
+require 'optparse'
+require 'optparse/time'
+require 'ostruct'
+
+options = OpenStruct.new
+opts = OptionParser.new do |opts|
+ opts.banner = <<-BANNER
+Usage: mack_ring_server <command>
+Available commands are:
+
+- start
+- stop
+- restart
+
+BANNER
+end
+
+opts.parse!(ARGV)
FileUtils.mkdir_p(File.join("tmp", "pids"))
Daemons.run_proc('mack_ring_server', {:dir_mode => :normal, :dir => File.join("tmp", "pids"), :monitor => true, :multiple => false}) do
puts 'Starting mack_ring_server...'
\ No newline at end of file