summarize: check more locations to discover QP dir
This commit is contained in:
parent
8fd04a2621
commit
0ca16d61a7
@ -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 {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user