@@ -41,7 +41,8 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
4141 php$fpm_v -mbstring php$fpm_v -opcache php$fpm_v -pspell php$fpm_v -readline
4242 php$fpm_v -xml postgresql postgresql-contrib proftpd-basic quota
4343 roundcube-core roundcube-mysql roundcube-plugins rrdtool rssh spamassassin
44- sudo hestia hestia-nginx hestia-php vim-common vsftpd whois zip acl sysstat setpriv"
44+ sudo hestia hestia-nginx hestia-php vim-common vsftpd whois zip acl sysstat
45+ setpriv libonig5"
4546
4647# Defining help function
4748help () {
561562# Installing Nginx repo
562563if [ " $nginx " = ' yes' ]; then
563564 echo " (*) NGINX"
564- if [ -e $apt /nginx.list ]; then
565- rm $apt /nginx.list
566- fi
567565 echo " deb [arch=amd64] http://nginx.org/packages/mainline/$VERSION / $codename nginx" \
568566 > $apt /nginx.list
569567 wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
@@ -581,7 +579,7 @@ if [ "$apache" = 'yes' ]; then
581579fi
582580
583581# Installing MariaDB repo
584- if [ " $mysql " = ' yes' ]; then
582+ if [ " $mysql " = ' yes' ] && [ " $release " != " 20.04 " ] ; then
585583 echo " (*) MariaDB"
586584 echo " deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/$mariadb_v /$VERSION $codename main" > $apt /mariadb.list
587585 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
@@ -793,10 +791,15 @@ if [ -d "$withdebs" ]; then
793791 software=$( echo " $software " | sed -e " s/hestia-php//" )
794792 software=$( echo " $software " | sed -e " s/hestia//" )
795793fi
796-
797- if [ " $release " = ' 16.04' ]; then
794+ if [ " $release " = ' 16.04' ] || [ " $release " = ' 20.04' ]; then
798795 software=$( echo " $software " | sed -e " s/setpriv/util-linux/" )
799796fi
797+ if [ " $release " = ' 20.04' ]; then
798+ software=$( echo " $software " | sed -e " s/rssh//" )
799+ fi
800+ if [ " $release " != ' 20.04' ]; then
801+ software=$( echo " $software " | sed -e " s/libonig5//" )
802+ fi
800803
801804# ----------------------------------------------------------#
802805# Disable Apparmor on LXC #
@@ -906,13 +909,15 @@ chmod 755 /etc/cron.daily/ntpdate
906909ntpdate -s pool.ntp.org
907910
908911# Setup rssh
909- if [ -z " $( grep /usr/bin/rssh /etc/shells) " ]; then
910- echo /usr/bin/rssh >> /etc/shells
912+ if [ " $release " != ' 20.04' ]; then
913+ if [ -z " $( grep /usr/bin/rssh /etc/shells) " ]; then
914+ echo /usr/bin/rssh >> /etc/shells
915+ fi
916+ sed -i ' s/#allowscp/allowscp/' /etc/rssh.conf
917+ sed -i ' s/#allowsftp/allowsftp/' /etc/rssh.conf
918+ sed -i ' s/#allowrsync/allowrsync/' /etc/rssh.conf
919+ chmod 755 /usr/bin/rssh
911920fi
912- sed -i ' s/#allowscp/allowscp/' /etc/rssh.conf
913- sed -i ' s/#allowsftp/allowsftp/' /etc/rssh.conf
914- sed -i ' s/#allowrsync/allowrsync/' /etc/rssh.conf
915- chmod 755 /usr/bin/rssh
916921
917922
918923# ----------------------------------------------------------#
@@ -1171,9 +1176,11 @@ if [ "$apache" = 'yes' ]; then
11711176 chmod 640 /var/log/apache2/access.log /var/log/apache2/error.log
11721177 chmod 751 /var/log/apache2/domains
11731178
1174- update-rc.d apache2 defaults > /dev/null 2>&1
1175- systemctl start apache2 >> $LOG
1176- check_result $? " apache2 start failed"
1179+ if [ " $release " != ' 20.04' ]; then
1180+ update-rc.d apache2 defaults > /dev/null 2>&1
1181+ systemctl start apache2 >> $LOG
1182+ check_result $? " apache2 start failed"
1183+ fi
11771184else
11781185 update-rc.d apache2 disable > /dev/null 2>&1
11791186 systemctl stop apache2 > /dev/null 2>&1
@@ -1318,8 +1325,9 @@ if [ "$mysql" = 'yes' ]; then
13181325 # Unpack files
13191326 tar xzf phpMyAdmin-$pma_v -all-languages.tar.gz
13201327
1321- # Delete file to prevent error
1328+ # Delete files to prevent error
13221329 rm -fr /usr/share/phpmyadmin/doc/html
1330+ rm -fr /usr/share/phpmyadmin/js/vendor/openlayers
13231331
13241332 # Overwrite old files
13251333 cp -rf phpMyAdmin-$pma_v -all-languages/* /usr/share/phpmyadmin
@@ -1329,7 +1337,7 @@ if [ "$mysql" = 'yes' ]; then
13291337 sed -i " s|define('TEMP_DIR', ROOT_PATH . 'tmp/');|define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');|" /usr/share/phpmyadmin/libraries/vendor_config.php
13301338
13311339 # Create temporary folder and change permission
1332- mkdir /usr/share/phpmyadmin/tmp
1340+ [ ! -d " /usr/share/phpmyadmin/tmp " ] && mkdir /usr/share/phpmyadmin/tmp
13331341 chmod 777 /usr/share/phpmyadmin/tmp
13341342
13351343 # Clear Up
13621370# ----------------------------------------------------------#
13631371
13641372if [ " $named " = ' yes' ]; then
1365- echo " (*) Configuring Bind DNS server..."
1373+ echo " (*) Configuring Bind DNS server..."
13661374 cp -f $HESTIA_INSTALL_DIR /bind/named.conf /etc/bind/
13671375 cp -f $HESTIA_INSTALL_DIR /bind/named.conf.options /etc/bind/
13681376 chown root:bind /etc/bind/named.conf
@@ -1378,8 +1386,13 @@ if [ "$named" = 'yes' ]; then
13781386 systemctl restart apparmor >> $LOG
13791387 fi
13801388 fi
1381- update-rc.d bind9 defaults
1382- systemctl start bind9
1389+ if [ " $release " = ' 20.04' ]; then
1390+ update-rc.d named defaults
1391+ systemctl start named
1392+ else
1393+ update-rc.d bind9 defaults
1394+ systemctl start bind9
1395+ fi
13831396 check_result $? " bind9 start failed"
13841397
13851398 # Workaround for OpenVZ/Virtuozzo
@@ -1434,7 +1447,7 @@ if [ "$dovecot" = 'yes' ]; then
14341447 gpasswd -a dovecot mail > /dev/null 2>&1
14351448 cp -rf $HESTIA_INSTALL_DIR /dovecot /etc/
14361449 cp -f $HESTIA_INSTALL_DIR /logrotate/dovecot /etc/logrotate.d/
1437- if [ " $release " = ' 18.04' ]; then
1450+ if [ " $release " = ' 18.04' ] || [ " $release " = ' 20.04 ' ] ; then
14381451 rm -f /etc/dovecot/conf.d/15-mailboxes.conf
14391452 fi
14401453 chown -R root:root /etc/dovecot*
@@ -1664,7 +1677,7 @@ if [ "$apache" = 'yes' ] && [ "$nginx" = 'yes' ] ; then
16641677 echo " </IfModule>" >> remoteip.conf
16651678 sed -i " s/LogFormat \" %h/LogFormat \" %a/g" /etc/apache2/apache2.conf
16661679 a2enmod remoteip >> $LOG
1667- systemctl restart apache2
1680+ systemctl start apache2
16681681fi
16691682
16701683# Configuring MariaDB host
0 commit comments