Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

… variable is set.
  • Loading branch information...
commit 5c78bc2c7ca76b94381c8ada4ec5d942e1c74623 1 parent eb8def2
@marktriggs marktriggs authored
Showing with 12 additions and 5 deletions.
  1. +12 −5 config/config-distribution.rb
View
17 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
Please sign in to comment.
Something went wrong with that request. Please try again.