diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-09-26 04:51:02 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-09-26 04:51:02 +0000 |
commit | bd5e6347889e1ac07256228935f6d4a73c872f64 (patch) | |
tree | f4b1e131ed0999fad9cac0323069f190e27696fe /bin | |
parent | 583294985fc18c08405378e1eda744978e1db08c (diff) | |
download | unicorn-bd5e6347889e1ac07256228935f6d4a73c872f64.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@352 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'bin')
-rw-r--r-- | bin/mongrel_rails | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/mongrel_rails b/bin/mongrel_rails index e5b5248..d96dc5d 100644 --- a/bin/mongrel_rails +++ b/bin/mongrel_rails @@ -139,7 +139,15 @@ module Mongrel if RUBY_PLATFORM !~ /mswin/ cmd = "ruby #{__FILE__} start #{original_args.join(' ')}" config.log "Restarting with arguments: #{cmd}" - exec cmd + config.stop + config.remove_pid_file + + if config.defaults[:daemon] + system cmd + else + STDERR.puts "Can't restart unless in daemon mode." + exit 1 + end else config.log "Win32 does not support restarts. Exiting." end |