1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-01-14 04:35:43 +02:00

[Dovecot] Fix check to determine running imapsync procs, todo: more jobs at the same time

This commit is contained in:
andryyy 2020-02-12 08:32:58 +01:00
parent 025d4e0954
commit 701198b8f4
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF

View File

@ -11,8 +11,8 @@ use sigtrap 'handler' => \&sig_handler, qw(INT TERM KILL QUIT);
sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
my $t = Proc::ProcessTable->new;
my $imapsync_running = grep { $_->{cmndline} =~ /^\/usr\/bin\/perl \/usr\/local\/bin\/imapsync\s/ } @{$t->table};
if ($imapsync_running eq 1)
my $imapsync_running = grep { $_->{cmndline} =~ /imapsync\s/i } @{$t->table};
if ($imapsync_running gt 1)
{
print "imapsync is active, exiting...";
exit;