Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

You've been down that road, Neo. You know where it ends. And I know i…

…t's not where you want to be.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2791 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 1832447fb6d40fbfb695896ff6a9c511e8405f7f 1 parent 927b847
@dhh dhh authored
Showing with 18 additions and 9 deletions.
  1. +2 −9 railties/bin/lighttpd
  2. +16 −0 railties/lib/commands/lighttpd.rb
View
11 railties/bin/lighttpd
@@ -1,10 +1,3 @@
#!/usr/local/bin/ruby
-
-if RUBY_PLATFORM !~ /mswin/ && `lighttpd -version 2>/dev/null`.size > 0
- puts "=> Rails application started on http://0.0.0.0:3000"
- puts "=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)"
-
- `lighttpd -D -f #{File.dirname(__FILE__) + "/../"}/config/lighttpd.conf`
-else
- puts "lighttpd is not available on your system"
-end
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/lighttpd'
View
16 railties/lib/commands/lighttpd.rb
@@ -0,0 +1,16 @@
+if RUBY_PLATFORM !~ /mswin/ && `lighttpd -version 2>/dev/null`.size > 0
+ puts "=> Rails application started on http://0.0.0.0:3000"
+
+ if ARGV.first == "-d"
+ puts "=> Configure in config/lighttpd.conf"
+ detach = true
+ else
+ puts "=> Call with -d to detach; Configure in config/lighttpd.conf"
+ puts "=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)"
+ detach = false
+ end
+
+ `lighttpd -f #{File.dirname(__FILE__) + "/../"}/config/lighttpd.conf`
+else
+ puts "lighttpd is not available on your system (or not in your path)"
+end
Please sign in to comment.
Something went wrong with that request. Please try again.