Load the default configuration file in lib/mailshears.rb.
[mailshears.git] / lib / mailshears.rb
1 # Load the rest of the code we'll use.
2
3 # And the necessary classes.
4 require 'mailshears/errors.rb'
5 require 'mailshears/exit_codes.rb'
6 require 'mailshears/postfixadmin_db'
7
8 # Load the default config file first, and let the user override it.
9 require 'default_configuration'
10
11 begin
12 # Try to load the user's configuration file.
13 userconf_path = ENV['HOME'] + '/.mailshears.conf'
14 require userconf_path
15 rescue
16 puts 'No user configuration file (~/.mailshears.conf) found.'
17 puts 'Continuing...'
18 end
19
20 Configuration::PLUGINS.each do |plugin_file|
21 require "mailshears/plugins/#{plugin_file}"
22 end
23