summarize: check more locations to discover QP dir
This commit is contained in:
parent
6758195578
commit
e9cf061d71
@ -3,6 +3,7 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
use Cwd;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use File::Tail;
|
use File::Tail;
|
||||||
|
|
||||||
@ -276,16 +277,20 @@ sub show_symbol {
|
|||||||
|
|
||||||
sub get_qp_dir {
|
sub get_qp_dir {
|
||||||
foreach my $user ( qw/ qpsmtpd smtpd / ) {
|
foreach my $user ( qw/ qpsmtpd smtpd / ) {
|
||||||
|
|
||||||
my ($homedir) = (getpwnam( $user ))[7] or next;
|
my ($homedir) = (getpwnam( $user ))[7] or next;
|
||||||
|
|
||||||
if ( -d "$homedir/plugins" ) {
|
if ( -d "$homedir/plugins" ) {
|
||||||
return "$homedir";
|
return "$homedir";
|
||||||
};
|
};
|
||||||
if ( -d "$homedir/smtpd/plugins" ) {
|
foreach my $s ( qw/ smtpd qpsmtpd qpsmtpd-dev / ) {
|
||||||
return "$homedir/smtpd";
|
if ( -d "$homedir/smtpd/plugins" ) {
|
||||||
|
return "$homedir/smtpd";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
if ( -d "./plugins" ) {
|
||||||
|
return Cwd::getcwd();
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sub populate_plugins_from_registry {
|
sub populate_plugins_from_registry {
|
||||||
|
Loading…
Reference in New Issue
Block a user