X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=mutt-licom.pl;h=08c25022834e0e244f2948d33b863e9765e754d3;hb=efe4485ed983d6573813abf54fe6ddd9e855434b;hp=c4d57502b3d2c693f5be82059423dc65543e8e52;hpb=783ab0bd9143c869d3e4538e21dcf9c698c6db27;p=licom.git diff --git a/mutt-licom.pl b/mutt-licom.pl index c4d5750..08c2502 100755 --- a/mutt-licom.pl +++ b/mutt-licom.pl @@ -9,10 +9,29 @@ use lib ("$Bin/lib"); use LiCoM::Config (qw(get_config)); use LiCoM::Person; -our $Config = get_config (); +our $Config; -die unless (defined ($Config->{'uri'}) and defined ($Config->{'bind_dn'}) - and defined ($Config->{'password'})); +if (-e $ENV{'HOME'} . '/.licomrc') +{ + $Config = get_config ($ENV{'HOME'} . '/.licomrc'); +} +elsif (-e '/etc/licom/licom.conf') +{ + $Config = get_config ('/etc/licom/licom.conf'); +} +else +{ + $Config = get_config (); +} + +unless (defined ($Config->{'uri'}) and defined ($Config->{'bind_dn'}) + and defined ($Config->{'password'})) +{ + die (<{'base_dn'} = $Config->{'bind_dn'} unless (defined ($Config->{'base_dn'}));