mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Allow script/server -c /path/to/lighttpd.conf
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3641 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Allow script/server -c /path/to/lighttpd.conf [Jeremy Kemper]
|
||||
|
||||
* Remove hardcoded path to reaper script in script/server [Jeremy Kemper]
|
||||
|
||||
* Update script.aculo.us to V1.5.3 [Thomas Fuchs]
|
||||
|
||||
@@ -12,10 +12,20 @@ end
|
||||
|
||||
require 'initializer'
|
||||
configuration = Rails::Initializer.run(:initialize_logger).configuration
|
||||
default_config_file = config_file = "#{RAILS_ROOT}/config/lighttpd.conf"
|
||||
|
||||
config_file = "#{RAILS_ROOT}/config/lighttpd.conf"
|
||||
require 'optparse'
|
||||
ARGV.options do |opt|
|
||||
opt.on('-c', "--config=#{config_file}", 'Specify a different lighttpd config file.') { |path| config_file = path }
|
||||
opt.on('-h', '--help', 'Show this message.') { puts opt; exit 0 }
|
||||
opt.parse!
|
||||
end
|
||||
|
||||
unless File.exist?(config_file)
|
||||
if config_file != default_config_file
|
||||
puts "=> #{config_file} not found."
|
||||
exit 1
|
||||
end
|
||||
require 'fileutils'
|
||||
source = File.expand_path(File.join(File.dirname(__FILE__),
|
||||
"..", "..", "..", "configs", "lighttpd.conf"))
|
||||
|
||||
Reference in New Issue
Block a user