Browse Source

Check for nginx presence before adding webmail template

Kristan Kenney 6 years ago
parent
commit
f1e55666f2
2 changed files with 6 additions and 4 deletions
  1. 3 2
      install/hst-install-debian.sh
  2. 3 2
      install/hst-install-ubuntu.sh

+ 3 - 2
install/hst-install-debian.sh

@@ -894,7 +894,6 @@ sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
 # Enable SFTP subsystem for SSH
 sftp_subsys_enabled=$(grep -iE "^#?.*subsystem.+(sftp )?sftp-server" /etc/ssh/sshd_config)
 if [ ! -z "$sftp_subsys_enabled" ]; then
-    echo "(*) Updating SFTP subsystem configuration..."
     sed -i -E "s/^#?.*Subsystem.+(sftp )?sftp-server/Subsystem sftp internal-sftp/g" /etc/ssh/sshd_config
 fi
 
@@ -1117,7 +1116,6 @@ if [ "$nginx" = 'yes' ]; then
     cp -f $hestiacp/nginx/status.conf /etc/nginx/conf.d/
     cp -f $hestiacp/nginx/phpmyadmin.inc /etc/nginx/conf.d/
     cp -f $hestiacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
-    cp -f $hestiacp/nginx/webmail.inc /etc/nginx/conf.d/
     cp -f $hestiacp/logrotate/nginx /etc/logrotate.d/
     mkdir -p /etc/nginx/conf.d/domains
     mkdir -p /var/log/nginx/domains
@@ -1508,6 +1506,9 @@ if [ "$dovecot" = 'yes' ] && [ "$mysql" = 'yes' ]; then
         cp -f $hestiacp/roundcube/apache.conf /etc/roundcube/
         ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
     fi
+    if [ "$nginx" = 'yes' ]; then
+        cp -f $hestiacp/nginx/webmail.inc /etc/nginx/conf.d/
+    fi
     cp -f $hestiacp/roundcube/main.inc.php /etc/roundcube/config.inc.php
     cp -f $hestiacp/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
     cp -f $hestiacp/roundcube/config.inc.php /etc/roundcube/plugins/password/

+ 3 - 2
install/hst-install-ubuntu.sh

@@ -868,7 +868,6 @@ sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
 # Enable SFTP subsystem for SSH
 sftp_subsys_enabled=$(grep -iE "^#?.*subsystem.+(sftp )?sftp-server" /etc/ssh/sshd_config)
 if [ ! -z "$sftp_subsys_enabled" ]; then
-    echo "(*) Updating SFTP subsystem configuration..."
     sed -i -E "s/^#?.*Subsystem.+(sftp )?sftp-server/Subsystem sftp internal-sftp/g" /etc/ssh/sshd_config
 fi
 
@@ -1086,7 +1085,6 @@ if [ "$nginx" = 'yes' ]; then
     cp -f $hestiacp/nginx/status.conf /etc/nginx/conf.d/
     cp -f $hestiacp/nginx/phpmyadmin.inc /etc/nginx/conf.d/
     cp -f $hestiacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
-    cp -f $hestiacp/nginx/webmail.inc /etc/nginx/conf.d/
     cp -f $hestiacp/logrotate/nginx /etc/logrotate.d/
     mkdir -p /etc/nginx/conf.d/domains
     mkdir -p /var/log/nginx/domains
@@ -1462,6 +1460,9 @@ if [ "$dovecot" = 'yes' ] && [ "$mysql" = 'yes' ]; then
         cp -f $hestiacp/roundcube/apache.conf /etc/roundcube/
         ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
     fi
+    if [ "$nginx" = 'yes' ]; then
+        cp -f $hestiacp/nginx/webmail.inc /etc/nginx/conf.d/
+    fi
     cp -f $hestiacp/roundcube/main.inc.php /etc/roundcube/config.inc.php
     cp -f $hestiacp/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
     cp -f $hestiacp/roundcube/config.inc.php /etc/roundcube/plugins/password/