Browse Source

Configure webmail alias only if Roundcube is installed

Kristan Kenney 6 years ago
parent
commit
c00edb60cf
2 changed files with 15 additions and 1 deletions
  1. 10 1
      install/hst-install-debian.sh
  2. 5 0
      install/hst-install-ubuntu.sh

+ 10 - 1
install/hst-install-debian.sh

@@ -1031,7 +1031,6 @@ fi
 # Mail stack
 if [ "$exim" = 'yes' ]; then
     echo "MAIL_SYSTEM='exim4'" >> $HESTIA/conf/hestia.conf
-    echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
     if [ "$clamd" = 'yes'  ]; then
         echo "ANTIVIRUS_SYSTEM='clamav-daemon'" >> $HESTIA/conf/hestia.conf
     fi
@@ -1553,6 +1552,16 @@ if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
             fi
         fi
     fi
+    # Configure webmail alias
+    echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
+
+    # Restart services
+    if [ "$apache" = 'yes' ]; then
+        service apache2 restart
+    fi
+    if [ "$nginx" = 'yes' ]; then
+        service nginx restart
+    fi
 fi
 
 

+ 5 - 0
install/hst-install-ubuntu.sh

@@ -1483,7 +1483,12 @@ if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
     sed -i "s/localhost/$servername/g" /etc/roundcube/plugins/password/config.inc.php
     mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
 
+    # Configure webmail alias
+    echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
+
     phpenmod mcrypt > /dev/null 2>&1
+
+    # Restart services
     if [ "$apache" = 'yes' ]; then
         service apache2 restart
     fi