File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
server/files/usr/local/ec2onrails/lib Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ def process_config_file_templates
137137 # Set any variables that will be needed inside the templates
138138 # We're processing ALL templates, even ones that won't be used in the current role.
139139 rails_env = Ec2onrails ::Utils . rails_env
140- config = Ec2onrails ::Utils . load_config
140+ config = Ec2onrails ::Utils . load_ec2onrails_config
141141 roles = self . roles
142142
143143 Dir [ "/etc/**/*.erb" ] . each do |template |
Original file line number Diff line number Diff line change @@ -13,12 +13,13 @@ def self.hostname
1313 `hostname -s` . strip
1414 end
1515
16- def self . load_config
17- config = { }
18- begin
19- config = eval ( File . read ( "/etc/ec2onrails/config.rb" ) )
20- rescue Exception => e
21- puts "ERROR:\n #{ e . inspect } \n #{ e . backtrace . join ( "\n " ) } "
16+ def self . load_ec2onrails_config
17+ config_file = "/mnt/app/current/config/ec2onrails/config.rb"
18+ if File . exists? ( config_file )
19+ config = eval ( File . read ( config_file ) )
20+ else
21+ puts "#{ config_file } doesn't exist"
22+ config = { }
2223 end
2324 return config
2425 end
You can’t perform that action at this time.
0 commit comments