Stop exim daemon when removing excess processes
This commit is contained in:
parent
5e9efd52bf
commit
5442dd106c
|
@ -1669,7 +1669,9 @@ function prevent_mail_process_overrun {
|
|||
{ echo '#!/bin/bash';
|
||||
echo "exim_ctr=\$(pgrep \"exim4\" | wc -l)";
|
||||
echo "if [ \"\$exim_ctr\" -gt 5 ]; then";
|
||||
echo ' exim -bp | exiqgrep -i | xargs exim -Mrm';
|
||||
echo ' systemctl stop exim4';
|
||||
echo ' exim -bp | exiqgrep -i | xargs exim -Mrm 2> /dev/null';
|
||||
echo ' systemctl start exim4';
|
||||
echo 'fi'; } > /usr/bin/exim_check
|
||||
chmod +x /usr/bin/exim_check
|
||||
cron_add_mins 5 '/usr/bin/exim_check'
|
||||
|
|
Loading…
Reference in New Issue