launcher_init.rb
1 require 'java' 2 require 'rubygems' 3 require 'config/config-distribution' 4 5 6 def init 7 base = (ENV['ASPACE_LAUNCHER_BASE'] || File.expand_path(File.join(File.dirname(__FILE__), ".."))) 8 java.lang.System.set_property("ASPACE_LAUNCHER_BASE", base) 9 10 AppConfig.reload 11 12 if !AppConfig.changed?(:data_directory) 13 # If the user hasn't specified a directory, write to data/ 14 # 15 # Set this as a system property to ensure it propagates to the webapps too. 16 java.lang.System.set_property("aspace.config.data_directory", 17 File.realpath(File.join(File.dirname(__FILE__), "..", "data"))) 18 AppConfig.reload 19 end 20 end 21 22 23 init