public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Copy lighttpd.conf when it is first needed, instead of on app creation


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2921 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
jamis (author)
Mon Nov 07 09:45:53 -0800 2005
commit  b49de6b74b4d96e64bf771c3c2111e68dc18dafa
tree    1c73708379946d4eb92670f092d6c1cd08840695
parent  aec5273f41af4f7c4cfa335b904b6fce6499bbda
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* Copy lighttpd.conf when it is first needed, instead of on app creation [Jamis Buck]
0
+
0
 * Use require_library_or_gem 'fcgi' in script/server [Sam Stephenson]
0
 
0
 * Added default lighttpd config in config/lighttpd.conf and added a default runner for lighttpd in script/server (works like script/server, but using lighttpd and FastCGI). It will use lighttpd if available, otherwise WEBrick. You can force either or using 'script/server lighttpd' or 'script/server webrick' [DHH]
...
1
2
 
3
4
5
...
1
 
2
3
4
5
0
@@ -1,5 +1,5 @@
0
 # Default configuration file for the lighttpd web server
0
-# Start using ./script/lighttpd
0
+# Start using ./script/server lighttpd
0
 
0
 server.port = 3000
0
 
...
21
22
23
 
 
 
 
 
 
 
 
24
25
26
...
21
22
23
24
25
26
27
28
29
30
31
32
33
34
0
@@ -21,6 +21,14 @@
0
 
0
 config_file = "#{RAILS_ROOT}/config/lighttpd.conf"
0
 
0
+unless File.exist?(config_file)
0
+ require 'fileutils'
0
+ source = File.expand_path(File.join(File.dirname(__FILE__),
0
+ "..", "..", "..", "configs", "lighttpd.conf"))
0
+ puts "=> #{config_file} not found, copying from #{source}"
0
+ FileUtils.cp source, config_file
0
+end
0
+
0
 port = IO.read(config_file).scan(/^server.port\s*=\s*(\d+)/).first rescue 3000
0
 puts "=> Rails application started on http://0.0.0.0:#{port}"
0
 
...
39
40
41
42
43
44
45
...
39
40
41
 
42
43
44
0
@@ -39,7 +39,6 @@
0
       }
0
       m.template "configs/routes.rb", "config/routes.rb"
0
       m.template "configs/apache.conf", "public/.htaccess"
0
- m.template "configs/lighttpd.conf", "config/lighttpd.conf"
0
 
0
       # Environments
0
       m.file "environments/boot.rb", "config/boot.rb"

Comments

    No one has commented yet.