X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/551fad0465af5ee41b091d3ea76f7c2ade1a4386..fe45b1b66c730f2546d78a7899375707c0816518:/services/api/lib/tasks/config_check.rake diff --git a/services/api/lib/tasks/config_check.rake b/services/api/lib/tasks/config_check.rake index c9f12fc1a9..b7316a5e19 100644 --- a/services/api/lib/tasks/config_check.rake +++ b/services/api/lib/tasks/config_check.rake @@ -1,8 +1,24 @@ namespace :config do desc 'Ensure site configuration has all required settings' task check: :environment do + $stderr.puts "%-32s %s" % ["AppVersion (discovered)", AppVersion.hash] $application_config.sort.each do |k, v| - $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")] + if ENV.has_key?('QUIET') then + # Make sure we still check for the variable to exist + eval("Rails.configuration.#{k}") + else + if /(password|secret|signing_key)/.match(k) then + # Make sure we still check for the variable to exist, but don't print the value + eval("Rails.configuration.#{k}") + $stderr.puts "%-32s %s" % [k, '*********'] + else + $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")] + end + end + end + # default_trash_lifetime cannot be less than 24 hours + if Rails.configuration.default_trash_lifetime < 86400 then + raise "default_trash_lifetime is %d, must be at least 86400" % Rails.configuration.default_trash_lifetime end end end