Skip to content

Commit

Permalink
Look for the config.rb file in CATALINA_HOME/conf/ if the environment…
Browse files Browse the repository at this point in the history
… variable is set.
  • Loading branch information
marktriggs committed Sep 14, 2012
1 parent eb8def2 commit 5c78bc2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions config/config-distribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,21 @@ def self.load_into(obj)


def self.load_user_config
config = File.join(File.dirname(__FILE__), "config.rb")

if java.lang.System.getProperty("aspace.config")
config = java.lang.System.getProperty("aspace.config")
possible_locations = [
java.lang.System.getProperty("aspace.config"),
File.join(File.dirname(__FILE__), "config.rb"),
]

if java.lang.System.getProperty("catalina.home")
possible_locations << File.join(java.lang.System.getProperty("catalina.home"), "conf", "config.rb")
end

if File.exists?(config)
require config
possible_locations.each do |config|
if config and File.exists?(config)
require config
break
end
end

self.load_overrides_from_properties
Expand Down

0 comments on commit 5c78bc2

Please sign in to comment.