66# https://www.hestiacp.com/
77#
88# Currently Supported Versions:
9- # Ubuntu 20.04, 22.04 LTS
9+ # Ubuntu 20.04, 22.04, 24.04 LTS
1010#
1111# ======================================================== #
1212
@@ -33,14 +33,14 @@ VERBOSE='no'
3333# Define software versions
3434HESTIA_INSTALL_VER=' 1.9.0~alpha'
3535# Supported PHP versions
36- multiphp_v=(" 5.6" " 7.0" " 7.1" " 7.2" " 7.3" " 7.4" " 8.0" " 8.1" " 8.2" , " 8.3" )
36+ multiphp_v=(" 5.6" " 7.0" " 7.1" " 7.2" " 7.3" " 7.4" " 8.0" " 8.1" " 8.2" " 8.3" )
3737# One of the following PHP versions is required for Roundcube / phpmyadmin
38- multiphp_required=(" 7.3" " 7.4" " 8.0" " 8.1" " 8.2" , " 8.3" )
38+ multiphp_required=(" 7.3" " 7.4" " 8.0" " 8.1" " 8.2" " 8.3" )
3939
4040# Default PHP version if none supplied
41- fpm_v=" 8.2 "
41+ fpm_v=" 8.3 "
4242# MariaDB version
43- mariadb_v=" 10.11 "
43+ mariadb_v=" 11.4 "
4444
4545# Defining software pack for all distros
4646software=" acl apache2 apache2.2-common apache2-suexec-custom apache2-utils apparmor-utils awstats bc bind9 bsdmainutils bsdutils
@@ -51,7 +51,7 @@ software="acl apache2 apache2.2-common apache2-suexec-custom apache2-utils appar
5151 php$fpm_v php$fpm_v -apcu php$fpm_v -bz2 php$fpm_v -cgi php$fpm_v -cli php$fpm_v -common php$fpm_v -curl php$fpm_v -gd
5252 php$fpm_v -imagick php$fpm_v -imap php$fpm_v -intl php$fpm_v -ldap php$fpm_v -mbstring php$fpm_v -mysql php$fpm_v -opcache
5353 php$fpm_v -pgsql php$fpm_v -pspell php$fpm_v -readline php$fpm_v -xml php$fpm_v -zip postgresql postgresql-contrib
54- proftpd-basic quota rrdtool rsyslog setpriv spamassassin sudo sysstat unzip vim-common vsftpd whois zip zstd jailkit"
54+ proftpd-basic quota rrdtool rsyslog util-linux spamassassin sudo sysstat unzip vim-common vsftpd whois zip zstd jailkit"
5555
5656installer_dependencies=" apt-transport-https ca-certificates curl dirmngr gnupg openssl software-properties-common wget"
5757
@@ -811,10 +811,14 @@ curl -s https://nginx.org/keys/nginx_signing.key | gpg --dearmor | tee /usr/shar
811811# Installing sury PHP repo
812812# add-apt-repository does not yet support signed-by see: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1862764
813813echo " [ * ] PHP"
814+ if [ " $release " = ' 24.04' ]; then
815+ # Workaround for Ubuntu 24.04 due to weak key warning it sheduled to be fixed in 24.04.1
816+ echo ' APT::Key::Assert-Pubkey-Algo "";' > /etc/apt/apt.conf.d/99weakkey-warning
817+ fi
814818LC_ALL= C.UTF-8 add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
815819
816820# Installing sury Apache2 repo
817- if [ " $apache " = ' yes' ]; then
821+ if [ " $apache " = ' yes' ] && [ " $release " != ' 24.04 ' ] ; then
818822 echo " [ * ] Apache2"
819823 echo " deb http://ppa.launchpad.net/ondrej/apache2/ubuntu $codename main" > $apt /apache2.list
820824fi
@@ -831,11 +835,13 @@ echo "[ * ] Hestia Control Panel"
831835echo " deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-keyring.gpg] https://$RHOST / $codename main" > $apt /hestia.list
832836gpg --no-default-keyring --keyring /usr/share/keyrings/hestia-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A189E93654F0B0E5 > /dev/null 2>&1
833837
834- # Installing Node.js 20.x repo
838+ # Detect if nodejs is allready installed if not add the repo
835839echo " [ * ] Node.js 20.x"
836- echo " deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x $codename main" > $apt /nodesource.list
837- echo " deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x $codename main" >> $apt /nodesource.list
838- curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg > /dev/null 2>&1
840+ if [ -z $( which " node" ) ]; then
841+ curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
842+ else
843+ echo " - Node.js is already installed"
844+ fi
839845
840846# Installing PostgreSQL repo
841847if [ " $postgresql " = ' yes' ]; then
@@ -1046,11 +1052,10 @@ if [ -d "$withdebs" ]; then
10461052 software=$( echo " $software " | sed -e " s/hestia=${HESTIA_INSTALL_VER} //" )
10471053fi
10481054if [ " $release " = ' 20.04' ]; then
1049- software=$( echo " $software " | sed -e " s/setpriv/util-linux/" )
10501055 software=$( echo " $software " | sed -e " s/libzip4/libzip5/" )
10511056fi
1052- if [ " $release " = ' 22 .04' ]; then
1053- software=$( echo " $software " | sed -e " s/setpriv/util-linux /" )
1057+ if [ " $release " = ' 24 .04' ]; then
1058+ software=$( echo " $software " | sed -e " s/libzip4/libzip4t64 /" )
10541059fi
10551060
10561061# ----------------------------------------------------------#
@@ -1484,7 +1489,7 @@ if [ "$release" = "20.04" ]; then
14841489 elif grep -qw " ^system_default = system_default_sect$" /etc/ssl/openssl.cnf 2> /dev/null; then
14851490 sed -i ' /^system_default = system_default_sect$/a system_default = hestia_openssl_sect\n\n[hestia_openssl_sect]\nCiphersuites = ' " $tls13_ciphers " ' \nOptions = PrioritizeChaCha' /etc/ssl/openssl.cnf
14861491 fi
1487- elif [ " $release " = " 22 .04" ]; then
1492+ elif [ " $release " ! = " 20 .04" ]; then
14881493 sed -i ' /^system_default = system_default_sect$/a system_default = hestia_openssl_sect\n\n[hestia_openssl_sect]\nCiphersuites = ' " $tls13_ciphers " ' \nOptions = PrioritizeChaCha' /etc/ssl/openssl.cnf
14891494fi
14901495
@@ -1495,7 +1500,7 @@ $HESTIA/bin/v-generate-ssl-cert $(hostname) '' 'US' 'California' \
14951500
14961501# Parsing certificate file
14971502crt_end= $( grep -n " END CERTIFICATE-" /tmp/hst.pem | cut -f 1 -d:)
1498- if [ " $release " = " 22 .04" ]; then
1503+ if [ " $release " ! = " 20 .04" ]; then
14991504 key_start=$( grep -n " BEGIN PRIVATE KEY" /tmp/hst.pem | cut -f 1 -d:)
15001505 key_end=$( grep -n " END PRIVATE KEY" /tmp/hst.pem | cut -f 1 -d:)
15011506else
@@ -1733,7 +1738,7 @@ if [ "$proftpd" = 'yes' ]; then
17331738 systemctl start proftpd >> $LOG
17341739 check_result $? " proftpd start failed"
17351740
1736- if [ " $release " = ' 22 .04' ]; then
1741+ if [ " $release " ! = ' 20 .04' ]; then
17371742 unit_files=" $( systemctl list-unit-files | grep proftpd) "
17381743 if [[ " $unit_files " =~ " disabled" ]]; then
17391744 systemctl enable proftpd
@@ -1757,8 +1762,8 @@ if [ "$mysql" = 'yes' ] || [ "$mysql8" = 'yes' ]; then
17571762 fi
17581763
17591764 if [ " $mysql_type " = ' MariaDB' ]; then
1760- # Run mysql_install_db
1761- mysql_install_db >> $LOG
1765+ # Run mariadb-install-db
1766+ mariadb-install-db >> $LOG
17621767 fi
17631768
17641769 # Remove symbolic link
@@ -2049,16 +2054,22 @@ fi
20492054# ----------------------------------------------------------#
20502055
20512056if [ " $spamd " = ' yes' ]; then
2057+ # Set SpamAssassin Service Name
2058+ if [ " $release " = ' 24.04' ]; then
2059+ spamd_srvname=" spamd"
2060+ else
2061+ spamd_srvname=" spamassassin"
2062+ fi
20522063 echo " [ * ] Configuring SpamAssassin..."
2053- update-rc.d spamassassin defaults > /dev/null 2>&1
2054- sed -i " s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
2055- systemctl start spamassassin >> $LOG
2056- check_result $? " spamassassin start failed"
2064+ update-rc.d $spamd_srvname defaults > /dev/null 2>&1
2065+ sed -i " s/ENABLED=0/ENABLED=1/" /etc/default/$spamd_srvname
2066+ systemctl start $spamd_srvname >> $LOG
2067+ check_result $? " $spamd_srvname start failed"
20572068 unit_files=" $( systemctl list-unit-files | grep spamassassin) "
20582069 if [[ " $unit_files " =~ " disabled" ]]; then
2059- systemctl enable spamassassin > /dev/null 2>&1
2070+ systemctl enable $spamd_srvname > /dev/null 2>&1
20602071 fi
2061- sed -i " s/#CRON=1/CRON=1/" /etc/default/spamassassin
2072+ sed -i " s/#CRON=1/CRON=1/" /etc/default/$spamd_srvname
20622073fi
20632074
20642075# ----------------------------------------------------------#
0 commit comments