Skip to content

Commit d7700ca

Browse files
authored
Ubuntu 24.04 LTS "Noble" Support (hestiacp#4411)
Add support for Noble / Ubuntu 24.04 support
1 parent 1d077cc commit d7700ca

File tree

8 files changed

+60
-50
lines changed

8 files changed

+60
-50
lines changed

bin/v-list-sys-services

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ get_srv_state() {
102102
pids=$(systemctl show $name.service | grep '^MainPID=' | cut -f2 -d=)
103103
fi
104104

105-
# Prevent from an SSH false positive when there is a TTY or SFTP connection but service is down
106-
if [ "$name" == 'ssh' ] && [ "$(systemctl show sshd.service | grep 'SubState=' | cut -f2 -d=)" != "running" ]; then
107-
pids=''
108-
fi
109-
110105
# Checking pid
111106
if [ -n "$pids" ]; then
112107
if [[ "$used_pgrep" -eq 1 ]]; then

install/hst-install-debian.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ 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
3838
multiphp_required=("7.3" "7.4" "8.0" "8.1" "8.2","8.3")
3939
# Default PHP version if none supplied
40-
fpm_v="8.2"
40+
fpm_v="8.3"
4141
# MariaDB version
42-
mariadb_v="10.11"
42+
mariadb_v="11.4"
4343

4444
# Defining software pack for all distros
4545
software="acl apache2 apache2-suexec-custom apache2-suexec-pristine apache2-utils awstats bc bind9 bsdmainutils bsdutils
@@ -866,11 +866,13 @@ echo "[ * ] Hestia Control Panel"
866866
echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-keyring.gpg] https://$RHOST/ $codename main" > $apt/hestia.list
867867
gpg --no-default-keyring --keyring /usr/share/keyrings/hestia-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A189E93654F0B0E5 > /dev/null 2>&1
868868

869-
# Installing Node.js 20.x repo
869+
# Detect if nodejs is allready installed if not add the repo
870870
echo "[ * ] Node.js 20.x"
871-
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x $codename main" > $apt/nodesource.list
872-
echo "deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x $codename main" >> $apt/nodesource.list
873-
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg > /dev/null 2>&1
871+
if [ -z $(which "node") ]; then
872+
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
873+
else
874+
echo "- Node.js is already installed"
875+
fi
874876

875877
# Installing PostgreSQL repo
876878
if [ "$postgresql" = 'yes' ]; then
@@ -1747,8 +1749,8 @@ if [ "$mysql" = 'yes' ] || [ "$mysql8" = 'yes' ]; then
17471749
fi
17481750

17491751
if [ "$mysql_type" = 'MariaDB' ]; then
1750-
# Run mysql_install_db
1751-
mysql_install_db >> $LOG
1752+
# Run mariadb-install-db
1753+
mariadb-install-db >> $LOG
17521754
fi
17531755

17541756
# Remove symbolic link

install/hst-install-ubuntu.sh

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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
3434
HESTIA_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
4646
software="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

5656
installer_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
813813
echo "[ * ] 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
814818
LC_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
820824
fi
@@ -831,11 +835,13 @@ echo "[ * ] Hestia Control Panel"
831835
echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-keyring.gpg] https://$RHOST/ $codename main" > $apt/hestia.list
832836
gpg --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
835839
echo "[ * ] 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
841847
if [ "$postgresql" = 'yes' ]; then
@@ -1046,11 +1052,10 @@ if [ -d "$withdebs" ]; then
10461052
software=$(echo "$software" | sed -e "s/hestia=${HESTIA_INSTALL_VER}//")
10471053
fi
10481054
if [ "$release" = '20.04' ]; then
1049-
software=$(echo "$software" | sed -e "s/setpriv/util-linux/")
10501055
software=$(echo "$software" | sed -e "s/libzip4/libzip5/")
10511056
fi
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/")
10541059
fi
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
14891494
fi
14901495

@@ -1495,7 +1500,7 @@ $HESTIA/bin/v-generate-ssl-cert $(hostname) '' 'US' 'California' \
14951500

14961501
# Parsing certificate file
14971502
crt_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:)
15011506
else
@@ -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

20512056
if [ "$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
20622073
fi
20632074

20642075
#----------------------------------------------------------#

install/upgrade/upgrade.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ pga_v='7.14.6'
5050

5151
# Set version of RoundCube (Webmail) to update during upgrade if not already installed
5252
# Note: only applies to "non-apt installs >= 1.4.0 or manually phased out"
53-
rc_v='1.6.5'
53+
rc_v='1.6.7'
5454

5555
# Set version of SnappyMail (Webmail) to update during upgrade if not already installed
56-
sm_v='2.29.4'
56+
sm_v='2.36.4'
5757

5858
# Update the File Manager or it's configuration file
5959
# Check if Filegator requires an update based on current version and setting below
6060
# UPGRADE_UPDATE_FILEMANAGER_CONFIG: Updates only the configuration file if changes are made but now new issue has been issued!
6161
UPGRADE_UPDATE_FILEMANAGER_CONFIG='false'
6262
# Set version of File manager to update during upgrade if not already installed
63-
fm_v='7.9.3'
63+
fm_v='7.10.1'
6464

6565
# Backblaze
6666
b2_v='3.6.0'

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/deb/nginx/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Source: hestia-nginx
22
Package: hestia-nginx
33
Priority: optional
4-
Version: 1.25.2-1
4+
Version: 1.27.0
55
Section: admin
66
Maintainer: HestiaCP <info@hestiacp.com>
77
Homepage: https://www.hestiacp.com

src/deb/php/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Source: hestia-php
22
Package: hestia-php
33
Priority: optional
4-
Version: 8.2.11-1
4+
Version: 8.3.9
55
Section: admin
66
Maintainer: HestaCP <info@hestiacp.com>
77
Homepage: https://www.hestiacp.com

src/hst_autocompile.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ if [ -e "/etc/redhat-release" ]; then
231231
else
232232
HESTIA_V="${BUILD_VER}_${BUILD_ARCH}"
233233
fi
234-
OPENSSL_V='3.1.2'
235-
PCRE_V='10.42'
236-
ZLIB_V='1.3'
234+
OPENSSL_V='3.3.1'
235+
PCRE_V='10.44'
236+
ZLIB_V='1.3.1'
237237

238238
# Create build directories
239239
if [ "$KEEPBUILD" != 'true' ]; then
@@ -282,10 +282,7 @@ if [ "$dontinstalldeps" != 'true' ]; then
282282
codename="$(lsb_release -s -c)"
283283

284284
if [ -z $(which "node") ]; then
285-
echo "Adding Node.js 20.x repo..."
286-
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x $codename main" > $apt/nodesource.list
287-
echo "deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x $codename main" >> $apt/nodesource.list
288-
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg > /dev/null 2>&1
285+
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
289286
fi
290287

291288
echo "Installing Node.js..."
@@ -594,6 +591,10 @@ if [ "$PHP_B" = true ]; then
594591
sed -i "/Conflicts: libzip5/d" "$BUILD_DIR_HESTIAPHP/DEBIAN/control"
595592
sed -i "s/libzip4/libzip5/g" "$BUILD_DIR_HESTIAPHP/DEBIAN/control"
596593
fi
594+
if [[ "$os" = "Ubuntu" ]] && [[ "$release" = "24.04" ]]; then
595+
sed -i "/Conflicts: libzip5/d" "$BUILD_DIR_HESTIAPHP/DEBIAN/control"
596+
sed -i "s/libzip4/libzip4t64/g" "$BUILD_DIR_HESTIAPHP/DEBIAN/control"
597+
fi
597598

598599
get_branch_file 'src/deb/php/copyright' "$BUILD_DIR_HESTIAPHP/DEBIAN/copyright"
599600
get_branch_file 'src/deb/php/postinst' "$BUILD_DIR_HESTIAPHP/DEBIAN/postinst"

0 commit comments

Comments
 (0)