From 139fc8ae74c5019003e1b4fa350240f8e9fedebc Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Thu, 10 Nov 2011 16:58:02 +0000 Subject: Changed mauve config to allow including directory and filenames. --- bin/mauveserver | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bin/mauveserver') diff --git a/bin/mauveserver b/bin/mauveserver index 77b372d..b0c3573 100644 --- a/bin/mauveserver +++ b/bin/mauveserver @@ -130,7 +130,9 @@ require 'mauve/configuration_builder' require 'mauve/configuration_builders' begin - Mauve::Configuration.current = Mauve::ConfigurationBuilder.load(configuration_file) + builder = Mauve::ConfigurationBuilder.new + builder.include_file(configuration_file) + Mauve::Configuration.current = builder.result rescue StandardError => ex error ex end @@ -149,8 +151,9 @@ end # Reload configuration # begin - new_config = Mauve::ConfigurationBuilder.load(configuration_file) - Mauve::Configuration.current = new_config + builder = Mauve::ConfigurationBuilder.new + builder.include_file(configuration_file) + Mauve::Configuration.current = builder.result rescue BuildException => ex Mauve::Server.instance.logger.error "Reconfiguration failed: #{ex.to_s}. Sticking with old one." end -- cgit v1.2.1