aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/Advisories.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index ac7a734..cda9528 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -12,10 +12,12 @@ use Email::Simple::Creator;
my $config_file = '/usr/share/mga-advisories/config';
my $config = LoadFile($ENV{MGAADV_CONF} || $config_file);
-my $etc_config_file = '/etc/mga-advisories.conf';
-my $etc_config = LoadFile($etc_config_file);
-foreach my $k (keys %$etc_config) {
- $config->{$k} = $etc_config->{$k};
+my $home_config_file = $ENV{HOME} . '/.mga-advisories/mga-advisories.conf';
+my $custom_config_file = -f $home_config_file ? $home_config_file
+ : '/etc/mga-advisories.conf';
+my $custom_config = LoadFile($custom_config_file);
+foreach my $k (keys %$custom_config) {
+ $config->{$k} = $custom_config->{$k};
}
my %basename = (