Permalink
Browse files

Look for the config.rb file in CATALINA_HOME/conf/ if the environment…

… variable is set.
  • Loading branch information...
1 parent eb8def2 commit 5c78bc2c7ca76b94381c8ada4ec5d942e1c74623 @marktriggs marktriggs committed Sep 14, 2012
Showing with 12 additions and 5 deletions.
  1. +12 −5 config/config-distribution.rb
@@ -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

0 comments on commit 5c78bc2

Please sign in to comment.