소스 검색

Stop exim daemon when removing excess processes

Bob Mottram 6 년 전
부모
커밋
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'