diff --git a/log/summarize.pl b/log/summarize.pl index 04784cc..b506d82 100755 --- a/log/summarize.pl +++ b/log/summarize.pl @@ -3,6 +3,7 @@ use strict; use warnings; +use Cwd; use Data::Dumper; use File::Tail; @@ -276,16 +277,20 @@ 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"; }; - if ( -d "$homedir/smtpd/plugins" ) { - return "$homedir/smtpd"; + 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 {