@@ -846,16 +846,19 @@ rm -f /usr/sbin/policy-rc.d
846846sed -i " s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
847847
848848# Disable SSH suffix broadcast
849- echo ' ' >> /etc/ssh/sshd_config
850- echo ' DebianBanner no' >> /etc/ssh/sshd_config
851-
852- service ssh restart
849+ if [ -z " $( grep " ^DebianBanner no" /etc/ssh/sshd_config) " ]; then
850+ echo ' ' >> /etc/ssh/sshd_config
851+ echo ' DebianBanner no' >> /etc/ssh/sshd_config
852+ service ssh restart
853+ fi
853854
854855# Disable AWStats cron
855856rm -f /etc/cron.d/awstats
856857
857858# Set directory color
858- echo ' LS_COLORS="$LS_COLORS:di=00;33"' >> /etc/profile
859+ if [ -z " $( grep ' LS_COLORS="$LS_COLORS:di=00;33"' /etc/profile) " ]; then
860+ echo ' LS_COLORS="$LS_COLORS:di=00;33"' >> /etc/profile
861+ fi
859862
860863# Registering /usr/sbin/nologin
861864if [ -z " $( grep nologin /etc/shells) " ]; then
@@ -1021,6 +1024,8 @@ chmod 751 $HESTIA/data/templates/web/unassigned/css
10211024chmod 751 $HESTIA /data/templates/web/unassigned/js
10221025chmod 751 $HESTIA /data/templates/web/unassigned/webfonts
10231026
1027+ mkdir -p /var/www/html
1028+
10241029# Install default success page
10251030cp -rf $hestiacp /templates/web/unassigned/* /var/www/html/
10261031
@@ -1063,7 +1068,6 @@ if [ "$nginx" = 'yes' ]; then
10631068 cp -f $hestiacp /nginx/status.conf /etc/nginx/conf.d/
10641069 cp -f $hestiacp /nginx/phpmyadmin.inc /etc/nginx/conf.d/
10651070 cp -f $hestiacp /nginx/phppgadmin.inc /etc/nginx/conf.d/
1066- cp -f $hestiacp /nginx/webmail.inc /etc/nginx/conf.d/
10671071 cp -f $hestiacp /logrotate/nginx /etc/logrotate.d/
10681072 mkdir -p /etc/nginx/conf.d/domains
10691073 mkdir -p /var/log/nginx/domains
@@ -1331,6 +1335,7 @@ if [ "$named" = 'yes' ]; then
13311335 cp -f $hestiacp /bind/named.conf.options /etc/bind/
13321336 chown root:bind /etc/bind/named.conf
13331337 chown root:bind /etc/bind/named.conf.options
1338+ chown bind:bind /var/cache/bind
13341339 chmod 640 /etc/bind/named.conf
13351340 chmod 640 /etc/bind/named.conf.options
13361341 aa-complain /usr/sbin/named > /dev/null 2>&1
@@ -1471,32 +1476,30 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
14711476 ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
14721477 fi
14731478 cp -f $hestiacp /roundcube/main.inc.php /etc/roundcube/
1474- cp -f $hestiacp /roundcube/db.inc.php /etc/roundcube/
1475- chmod 640 /etc/roundcube/debian-db*
1476- chown root:www-data /etc/roundcube/debian-db*
1477- cp -f $hestiacp /roundcube/hestia.php \
1478- /usr/share/roundcube/plugins/password/drivers/
1479+ cp -f $hestiacp /roundcube/db.inc.php /etc/roundcube/
14791480 cp -f $hestiacp /roundcube/config.inc.php /etc/roundcube/plugins/password/
1481+ cp -f $hestiacp /roundcube/hestia.php /usr/share/roundcube/plugins/password/drivers/
1482+
14801483 r=" $( gen_pass) "
14811484 mysql -e " CREATE DATABASE roundcube"
14821485 mysql -e " GRANT ALL ON roundcube.*
14831486 TO roundcube@localhost IDENTIFIED BY '$r '"
14841487 sed -i " s/%password%/$r /g" /etc/roundcube/db.inc.php
14851488
14861489 # Send all emails through SMTP and add user information
1487- sed -i " /\$ config\['smtp_server'\]/c\$ config\['smtp_server'\] = 'localhost';" /etc/roundcube/defaults .inc.php
1488- sed -i " /\$ config\['smtp_user'\]/c\$ config\['smtp_user'\] = '%u';" /etc/roundcube/defaults .inc.php
1489- sed -i " /\$ config\['smtp_pass'\]/c\$ config\['smtp_pass'\] = '%p';" /etc/roundcube/defaults .inc.php
1490+ sed -i " /\$ config\['smtp_server'\]/c\$ config\['smtp_server'\] = 'localhost';" /etc/roundcube/main .inc.php
1491+ sed -i " /\$ config\['smtp_user'\]/c\$ config\['smtp_user'\] = '%u';" /etc/roundcube/main .inc.php
1492+ sed -i " /\$ config\['smtp_pass'\]/c\$ config\['smtp_pass'\] = '%p';" /etc/roundcube/main .inc.php
14901493
14911494 touch /var/log/roundcube/errors
14921495 chmod 640 /var/log/roundcube/errors
14931496 chown www-data:adm /var/log/roundcube/errors
14941497 if [ " $release " = ' 16.04' ] || [ " $release " = ' 18.04' ]; then
14951498 mv /etc/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
14961499 mv /etc/roundcube/main.inc.php /etc/roundcube/config.inc.php
1497- chmod 640 /etc/roundcube/debian-db-roundcube.php
1498- chown root:www-data /etc/roundcube/debian-db-roundcube.php
14991500 fi
1501+ chmod 640 /etc/roundcube/debian-db*
1502+ chown root:www-data /etc/roundcube/debian-db*
15001503
15011504 mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
15021505 phpenmod mcrypt > /dev/null 2>&1
0 commit comments