浏览代码

Stop exim daemon when removing excess processes

Bob Mottram 7 年前
父节点
当前提交
5442dd106c
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      src/freedombone-base-email

+ 3
- 1
src/freedombone-base-email 查看文件

@@ -1669,7 +1669,9 @@ function prevent_mail_process_overrun {
1669 1669
     { echo '#!/bin/bash';
1670 1670
       echo "exim_ctr=\$(pgrep \"exim4\" | wc -l)";
1671 1671
       echo "if [ \"\$exim_ctr\" -gt 5 ]; then";
1672
-      echo '    exim -bp | exiqgrep -i | xargs exim -Mrm';
1672
+      echo '    systemctl stop exim4';
1673
+      echo '    exim -bp | exiqgrep -i | xargs exim -Mrm 2> /dev/null';
1674
+      echo '    systemctl start exim4';
1673 1675
       echo 'fi'; } > /usr/bin/exim_check
1674 1676
     chmod +x /usr/bin/exim_check
1675 1677
     cron_add_mins 5 '/usr/bin/exim_check'