examples/app_skeleton/scripts/merb_stop in merb-0.0.7 vs examples/app_skeleton/scripts/merb_stop in merb-0.0.8
- old
+ new
@@ -1,5 +1,13 @@
#!/usr/bin/env ruby
+require 'fileutils'
-pid = File.open(File.dirname(__FILE__)+"/../log/merb.pid"){|f| f.read.chomp.to_i }
+pids=[]
-Process.kill(9, pid)
\ No newline at end of file
+port_or_star = ARGV[0] || '*'
+
+Dir[File.dirname(__FILE__)+"/../log/merb.#{port_or_star}.pid"].each do |f|
+ pid = IO.read(f).chomp.to_i
+ puts "killing PID: #{pid}"
+ Process.kill(9, pid)
+ FileUtils.rm f
+end