Преглед на файлове

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram преди 6 години
родител
ревизия
b758b2f203
променени са 2 файла, в които са добавени 14 реда и са изтрити 0 реда
  1. 13
    0
      src/freedombone-base-email
  2. 1
    0
      src/freedombone-upgrade

+ 13
- 0
src/freedombone-base-email Целия файл

1663
     fi
1663
     fi
1664
 }
1664
 }
1665
 
1665
 
1666
+function prevent_mail_process_overrun {
1667
+    # This prevents any large buildup of exim processes, perhaps due to
1668
+    # Tor unavailability, from disabling the server
1669
+    { echo '#!/bin/bash';
1670
+      echo "exim_ctr=\$(pgrep \"exim4\" | wc -l)";
1671
+      echo "if [ \"\$exim_ctr\" -gt 5 ]; then";
1672
+      echo '    exim -bp | exiqgrep -i | xargs exim -Mrm';
1673
+      echo 'fi'; } > /usr/bin/exim_check
1674
+    chmod +x /usr/bin/exim_check
1675
+    cron_add_mins 5 '/usr/bin/exim_check'
1676
+}
1677
+
1666
 function install_email {
1678
 function install_email {
1667
     if [[ $SYSTEM_TYPE == "mesh"* ]]; then
1679
     if [[ $SYSTEM_TYPE == "mesh"* ]]; then
1668
         return
1680
         return
1675
     check_email_address_exists
1687
     check_email_address_exists
1676
     install_email_basic
1688
     install_email_basic
1677
     configure_email_onion
1689
     configure_email_onion
1690
+    prevent_mail_process_overrun
1678
 
1691
 
1679
     mark_completed "${FUNCNAME[0]}"
1692
     mark_completed "${FUNCNAME[0]}"
1680
 }
1693
 }

+ 1
- 0
src/freedombone-upgrade Целия файл

102
         email_disable_chunking
102
         email_disable_chunking
103
         rm /etc/exim4/exim4.conf.template.bak*
103
         rm /etc/exim4/exim4.conf.template.bak*
104
         email_update_onion_domain
104
         email_update_onion_domain
105
+        prevent_mail_process_overrun
105
         #defrag_filesystem
106
         #defrag_filesystem
106
 
107
 
107
         # reinstall tor from backports
108
         # reinstall tor from backports