summarize: check more locations to discover QP dir

This commit is contained in:
Matt Simerson 2012-06-27 20:15:13 -04:00 committed by Matt Simerson
parent 6758195578
commit e9cf061d71

View File

@ -3,6 +3,7 @@
use strict;
use warnings;
use Cwd;
use Data::Dumper;
use File::Tail;
@ -276,17 +277,21 @@ sub show_symbol {
sub get_qp_dir {
foreach my $user ( qw/ qpsmtpd smtpd / ) {
my ($homedir) = (getpwnam( $user ))[7] or next;
if ( -d "$homedir/plugins" ) {
return "$homedir";
};
foreach my $s ( qw/ smtpd qpsmtpd qpsmtpd-dev / ) {
if ( -d "$homedir/smtpd/plugins" ) {
return "$homedir/smtpd";
};
};
};
if ( -d "./plugins" ) {
return Cwd::getcwd();
};
};
sub populate_plugins_from_registry {