Browse Source

Stop exim daemon when removing excess processes

Bob Mottram 7 years ago
parent
commit
5442dd106c
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/freedombone-base-email

+ 3
- 1
src/freedombone-base-email View File

1669
     { echo '#!/bin/bash';
1669
     { echo '#!/bin/bash';
1670
       echo "exim_ctr=\$(pgrep \"exim4\" | wc -l)";
1670
       echo "exim_ctr=\$(pgrep \"exim4\" | wc -l)";
1671
       echo "if [ \"\$exim_ctr\" -gt 5 ]; then";
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
       echo 'fi'; } > /usr/bin/exim_check
1675
       echo 'fi'; } > /usr/bin/exim_check
1674
     chmod +x /usr/bin/exim_check
1676
     chmod +x /usr/bin/exim_check
1675
     cron_add_mins 5 '/usr/bin/exim_check'
1677
     cron_add_mins 5 '/usr/bin/exim_check'