Browse Source

Check for config files

Bob Mottram 9 years ago
parent
commit
1d7332fd51
1 changed files with 26 additions and 0 deletions
  1. 26
    0
      src/freedombone

+ 26
- 0
src/freedombone View File

@@ -5641,6 +5641,10 @@ function configure_imap {
5641 5641
   chown root:dovecot /etc/ssl/certs/dovecot.*
5642 5642
   chown root:dovecot /etc/ssl/private/dovecot.*
5643 5643
 
5644
+  if [ ! -f /etc/dovecot/conf.d/10-ssl.conf]; then
5645
+      echo 'Unable to find /etc/dovecot/conf.d/10-ssl.conf'
5646
+      exit 83629
5647
+  fi
5644 5648
   sed -i 's|#ssl =.*|ssl = required|g' /etc/dovecot/conf.d/10-ssl.conf
5645 5649
   sed -i 's|ssl = no|ssl = required|g' /etc/dovecot/conf.d/10-ssl.conf
5646 5650
   sed -i 's|ssl = yes|ssl = required|g' /etc/dovecot/conf.d/10-ssl.conf
@@ -5654,15 +5658,37 @@ function configure_imap {
5654 5658
   sed -i "s|ssl_protocols =.*|ssl_protocols = '$SSL_PROTOCOLS'|g" /etc/dovecot/conf.d/10-ssl.conf
5655 5659
   echo "ssl_cipher_list = '$SSL_CIPHERS'" >> /etc/dovecot/conf.d/10-ssl.conf
5656 5660
 
5661
+  if [ ! -f /etc/dovecot/conf.d/10-master.conf ]; then
5662
+      echo 'Unable to find /etc/dovecot/conf.d/10-master.conf'
5663
+      exit 49259
5664
+  fi
5657 5665
   sed -i 's/#process_limit =.*/process_limit = 5/g' /etc/dovecot/conf.d/10-master.conf
5658 5666
   sed -i 's/#default_client_limit.*/default_client_limit = 5/g' /etc/dovecot/conf.d/10-master.conf
5659 5667
   sed -i 's|#default_process_limit =.*|default_process_limit = 100|g' /etc/dovecot/conf.d/10-master.conf
5660 5668
 
5669
+  if [ ! -f /etc/dovecot/conf.d/10-logging.conf ]; then
5670
+      echo 'Unable to find /etc/dovecot/conf.d/10-logging.conf'
5671
+      exit 48936
5672
+  fi
5661 5673
   sed -i 's/#auth_verbose.*/auth_verbose = yes/g' /etc/dovecot/conf.d/10-logging.conf
5662 5674
 
5675
+  if [ ! -f /etc/dovecot/dovecot.conf ]; then
5676
+      echo 'Unable to find /etc/dovecot/dovecot.conf'
5677
+      exit 43890
5678
+  fi
5663 5679
   sed -i 's/#listen =.*/listen = */g' /etc/dovecot/dovecot.conf
5680
+
5681
+  if [ ! -f /etc/dovecot/conf.d/10-auth.conf ]; then
5682
+      echo 'Unable to find /etc/dovecot/conf.d/10-auth.conf'
5683
+      exit 843256
5684
+  fi
5664 5685
   sed -i 's/#disable_plaintext_auth =.*/disable_plaintext_auth = no/g' /etc/dovecot/conf.d/10-auth.conf
5665 5686
   sed -i 's/auth_mechanisms =.*/auth_mechanisms = plain login/g' /etc/dovecot/conf.d/10-auth.conf
5687
+
5688
+  if [ ! -f /etc/dovecot/conf.d/10-mail.conf ]; then
5689
+      echo 'Unable to find /etc/dovecot/conf.d/10-mail.conf'
5690
+      exit 42036
5691
+  fi
5666 5692
   sed -i 's|mail_location =.*|mail_location = maildir:~/Maildir:LAYOUT=fs|g' /etc/dovecot/conf.d/10-mail.conf
5667 5693
 
5668 5694
   service dovecot restart