Skip to content

Commit 01fc0f4

Browse files
authored
Add support for Jammy (hestiacp#2537)
* Drop RSSH support Package is not available for Ubuntu 20.04 / 22.04 and Debian 10 and 11 Debian 9 goes EOL end of June and Ubuntu 18.04 goes EOL next year * Add support for Jammy * Fix for proftpd * Drop support for Debian 9 installers
1 parent 4f546ba commit 01fc0f4

File tree

3 files changed

+52
-81
lines changed

3 files changed

+52
-81
lines changed

install/hst-install-debian.sh

Lines changed: 20 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -39,40 +39,23 @@ multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1")
3939
fpm_v="8.0"
4040
mariadb_v="10.6"
4141

42-
if [ "$release" -eq 9 ]; then
43-
software="nginx apache2 apache2-utils apache2-suexec-custom
44-
libapache2-mod-fcgid libapache2-mod-php$fpm_v php$fpm_v php$fpm_v-common
45-
php$fpm_v-cgi php$fpm_v-mysql php$fpm_v-curl php$fpm_v-pgsql
46-
php$fpm_v-imagick php$fpm_v-imap php$fpm_v-ldap php$fpm_v-apcu awstats
47-
php$fpm_v-zip php$fpm_v-bz2 php$fpm_v-cli php$fpm_v-gd php$fpm_v-intl
48-
php$fpm_v-mbstring php$fpm_v-opcache php$fpm_v-pspell
49-
php$fpm_v-readline php$fpm_v-xml vsftpd proftpd-basic bind9 exim4
50-
exim4-daemon-heavy clamav-daemon spamassassin dovecot-imapd
51-
dovecot-pop3d dovecot-sieve dovecot-managesieved
52-
net-tools mariadb-client mariadb-common mariadb-server
53-
postgresql postgresql-contrib phppgadmin mc flex whois rssh git idn unzip zip
54-
sudo bc ftp lsof rrdtool quota e2fslibs bsdutils e2fsprogs curl
55-
imagemagick fail2ban dnsutils bsdmainutils cron hestia=${HESTIA_INSTALL_VER} hestia-nginx
56-
hestia-php expect libmail-dkim-perl unrar-free vim-common acl sysstat
57-
rsyslog openssh-server setpriv ipset libapache2-mod-ruid2 zstd lsb-release"
58-
elif [ "$release" -eq 10 ] || [ "$release" -eq 11 ]; then
59-
software="nginx apache2 apache2-utils apache2-suexec-custom
60-
apache2-suexec-pristine libapache2-mod-fcgid libapache2-mod-php$fpm_v
61-
php$fpm_v php$fpm_v-common php$fpm_v-cgi php$fpm_v-mysql php$fpm_v-curl
62-
php$fpm_v-pgsql php$fpm_v-imagick php$fpm_v-imap php$fpm_v-ldap
63-
php$fpm_v-apcu php$fpm_v-zip php$fpm_v-bz2 php$fpm_v-cli
64-
php$fpm_v-gd php$fpm_v-intl php$fpm_v-mbstring
65-
php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline php$fpm_v-xml
66-
awstats vsftpd proftpd-basic bind9 exim4 exim4-daemon-heavy
67-
clamav-daemon spamassassin dovecot-imapd dovecot-pop3d dovecot-sieve dovecot-managesieved
68-
net-tools mariadb-client mariadb-common mariadb-server postgresql
69-
postgresql-contrib phppgadmin mc flex whois git idn unzip zip sudo bc ftp lsof
70-
rrdtool quota e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban
71-
dnsutils bsdmainutils cron hestia=${HESTIA_INSTALL_VER} hestia-nginx
72-
hestia-php expect libmail-dkim-perl unrar-free vim-common acl sysstat
73-
rsyslog openssh-server util-linux ipset libapache2-mpm-itk zstd
74-
lsb-release"
75-
fi
42+
software="nginx apache2 apache2-utils apache2-suexec-custom
43+
apache2-suexec-pristine libapache2-mod-fcgid libapache2-mod-php$fpm_v
44+
php$fpm_v php$fpm_v-common php$fpm_v-cgi php$fpm_v-mysql php$fpm_v-curl
45+
php$fpm_v-pgsql php$fpm_v-imagick php$fpm_v-imap php$fpm_v-ldap
46+
php$fpm_v-apcu php$fpm_v-zip php$fpm_v-bz2 php$fpm_v-cli
47+
php$fpm_v-gd php$fpm_v-intl php$fpm_v-mbstring
48+
php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline php$fpm_v-xml
49+
awstats vsftpd proftpd-basic bind9 exim4 exim4-daemon-heavy
50+
clamav-daemon spamassassin dovecot-imapd dovecot-pop3d dovecot-sieve dovecot-managesieved
51+
net-tools mariadb-client mariadb-common mariadb-server postgresql
52+
postgresql-contrib phppgadmin mc flex whois git idn unzip zip sudo bc ftp lsof
53+
rrdtool quota e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban
54+
dnsutils bsdmainutils cron hestia=${HESTIA_INSTALL_VER} hestia-nginx
55+
hestia-php expect libmail-dkim-perl unrar-free vim-common acl sysstat
56+
rsyslog openssh-server util-linux ipset libapache2-mpm-itk zstd
57+
lsb-release"
58+
7659

7760
installer_dependencies="apt-transport-https curl dirmngr gnupg wget ca-certificates"
7861

@@ -1040,17 +1023,6 @@ sed -i 's/#NTP=/NTP=pool.ntp.org/' /etc/systemd/timesyncd.conf
10401023
systemctl enable systemd-timesyncd
10411024
systemctl start systemd-timesyncd
10421025

1043-
# Setup rssh
1044-
if [ "$release" -eq 9 ]; then
1045-
if [ -z "$(grep /usr/bin/rssh /etc/shells)" ]; then
1046-
echo /usr/bin/rssh >> /etc/shells
1047-
fi
1048-
sed -i 's/#allowscp/allowscp/' /etc/rssh.conf
1049-
sed -i 's/#allowsftp/allowsftp/' /etc/rssh.conf
1050-
sed -i 's/#allowrsync/allowrsync/' /etc/rssh.conf
1051-
chmod 755 /usr/bin/rssh
1052-
fi
1053-
10541026
# Restrict access to /proc fs
10551027
# - Prevent unpriv users from seeing each other running processes
10561028
mount -o remount,defaults,hidepid=2 /proc > /dev/null 2>&1
@@ -1135,14 +1107,8 @@ if [ "$apache" = 'no' ]; then
11351107

11361108
fi
11371109

1138-
if [ "$release" -ge 9 ] || [ "$multiphp" = 'yes' ]; then
1139-
if [ "$phpfpm" = 'yes' ]; then
1140-
write_config_value "WEB_BACKEND" "php-fpm"
1141-
fi
1142-
else
1143-
if [ "$phpfpm" = 'yes' ]; then
1144-
write_config_value "WEB_BACKEND" "php5-fpm"
1145-
fi
1110+
if [ "$phpfpm" = 'yes' ]; then
1111+
write_config_value "WEB_BACKEND" "php-fpm"
11461112
fi
11471113

11481114
# Database stack
@@ -1374,11 +1340,7 @@ if [ "$apache" = 'yes' ]; then
13741340
a2enmod mpm_event > /dev/null 2>&1
13751341
cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf /etc/apache2/conf.d/
13761342
else
1377-
if [ "$release" -eq 10 ] || [ "$release" -eq 11 ]; then
1378-
a2enmod mpm_itk > /dev/null 2>&1
1379-
else
1380-
a2enmod ruid2 > /dev/null 2>&1
1381-
fi
1343+
a2enmod mpm_itk > /dev/null 2>&1
13821344
fi
13831345

13841346
echo "# Powered by hestia" > /etc/apache2/sites-available/default

install/hst-install-ubuntu.sh

Lines changed: 31 additions & 22 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 18.04 LTS, 20.04 LTS
9+
# Ubuntu 18.04 LTS, 20.04, 22.04 LTS
1010
#
1111
# ======================================================== #
1212

@@ -51,7 +51,7 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
5151
php$fpm_v-pgsql php$fpm_v-zip php$fpm_v-bz2 php$fpm_v-cli php$fpm_v-gd
5252
php$fpm_v-imagick php$fpm_v-intl php$fpm_v-mbstring
5353
php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline php$fpm_v-xml
54-
postgresql postgresql-contrib proftpd-basic quota rrdtool rssh spamassassin sudo hestia=${HESTIA_INSTALL_VER}
54+
postgresql postgresql-contrib proftpd-basic quota rrdtool spamassassin sudo hestia=${HESTIA_INSTALL_VER}
5555
hestia-nginx hestia-php vim-common vsftpd whois unzip zip acl sysstat setpriv rsyslog
5656
ipset libonig5 libzip5 openssh-server lsb-release zstd"
5757

@@ -915,8 +915,11 @@ if [ "$release" = '18.04' ]; then
915915
fi
916916
if [ "$release" = '20.04' ]; then
917917
software=$(echo "$software" | sed -e "s/setpriv/util-linux/")
918-
software=$(echo "$software" | sed -e "s/rssh//")
919918
fi
919+
if [ "$release" = '22.04' ]; then
920+
software=$(echo "$software" | sed -e "s/setpriv/util-linux/")
921+
software=$(echo "$software" | sed -e "s/libzip5/libzip4/")
922+
fi
920923

921924

922925
#----------------------------------------------------------#
@@ -1037,17 +1040,6 @@ sed -i 's/#NTP=/NTP=pool.ntp.org/' /etc/systemd/timesyncd.conf
10371040
systemctl enable systemd-timesyncd
10381041
systemctl start systemd-timesyncd
10391042

1040-
# Setup rssh
1041-
if [ "$release" != '20.04' ]; then
1042-
if [ -z "$(grep /usr/bin/rssh /etc/shells)" ]; then
1043-
echo /usr/bin/rssh >> /etc/shells
1044-
fi
1045-
sed -i 's/#allowscp/allowscp/' /etc/rssh.conf
1046-
sed -i 's/#allowsftp/allowsftp/' /etc/rssh.conf
1047-
sed -i 's/#allowrsync/allowrsync/' /etc/rssh.conf
1048-
chmod 755 /usr/bin/rssh
1049-
fi
1050-
10511043
# Check iptables paths and add symlinks when necessary
10521044
if [ ! -e "/sbin/iptables" ]; then
10531045
if which iptables; then
@@ -1303,9 +1295,13 @@ else
13031295
'San Francisco' 'Hestia Control Panel' 'IT' > /tmp/hst.pem
13041296
fi
13051297
# Parsing certificate file
1306-
crt_end=$(grep -n "END CERTIFICATE-" /tmp/hst.pem |cut -f 1 -d:)
1307-
key_start=$(grep -n "BEGIN RSA" /tmp/hst.pem |cut -f 1 -d:)
1308-
key_end=$(grep -n "END RSA" /tmp/hst.pem |cut -f 1 -d:)
1298+
if [ "$release" = "22.04" ]; then
1299+
key_start=$(grep -n "BEGIN PRIVATE KEY" /tmp/hst.pem |cut -f 1 -d:)
1300+
key_end=$(grep -n "END PRIVATE KEY" /tmp/hst.pem |cut -f 1 -d:)
1301+
else
1302+
key_start=$(grep -n "BEGIN RSA" /tmp/hst.pem |cut -f 1 -d:)
1303+
key_end=$(grep -n "END RSA" /tmp/hst.pem |cut -f 1 -d:)
1304+
fi
13091305

13101306
# Adding SSL certificate
13111307
echo "[ * ] Adding SSL certificate to Hestia Control Panel..."
@@ -1516,9 +1512,18 @@ if [ "$proftpd" = 'yes' ]; then
15161512
echo "127.0.0.1 $servername" >> /etc/hosts
15171513
cp -f $HESTIA_INSTALL_DIR/proftpd/proftpd.conf /etc/proftpd/
15181514
cp -f $HESTIA_INSTALL_DIR/proftpd/tls.conf /etc/proftpd/
1515+
if [ "$release" = '22.04' ]; then
1516+
sed -i 's|IdentLookups off|#IdentLookups off|g' /etc/proftpd/proftpd.conf
1517+
fi
15191518
update-rc.d proftpd defaults > /dev/null 2>&1
15201519
systemctl start proftpd >> $LOG
15211520
check_result $? "proftpd start failed"
1521+
if [ "$release" = '22.04' ]; then
1522+
unit_files="$(systemctl list-unit-files |grep proftpd)"
1523+
if [[ "$unit_files" =~ "disabled" ]]; then
1524+
systemctl enable proftpd
1525+
fi
1526+
fi
15221527
fi
15231528

15241529

@@ -1673,7 +1678,7 @@ if [ "$named" = 'yes' ]; then
16731678
systemctl restart apparmor >> $LOG
16741679
fi
16751680
fi
1676-
if [ "$release" = '20.04' ]; then
1681+
if [ "$release" != '18.04' ]; then
16771682
update-rc.d named defaults
16781683
systemctl start named
16791684
else
@@ -1696,7 +1701,12 @@ fi
16961701
if [ "$exim" = 'yes' ]; then
16971702
echo "[ * ] Configuring Exim mail server..."
16981703
gpasswd -a Debian-exim mail > /dev/null 2>&1
1699-
cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.template /etc/exim4/
1704+
if [ "$release" = "22.04" ]; then
1705+
# Jammyy uses Exim 4.95 instead but config works with Exim4.94
1706+
cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.4.94.template /etc/exim4/
1707+
else
1708+
cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.template /etc/exim4/
1709+
fi
17001710
cp -f $HESTIA_INSTALL_DIR/exim/dnsbl.conf /etc/exim4/
17011711
cp -f $HESTIA_INSTALL_DIR/exim/spam-blocks.conf /etc/exim4/
17021712
cp -f $HESTIA_INSTALL_DIR/exim/limit.conf /etc/exim4/
@@ -1736,9 +1746,8 @@ if [ "$dovecot" = 'yes' ]; then
17361746
gpasswd -a dovecot mail > /dev/null 2>&1
17371747
cp -rf $HESTIA_INSTALL_DIR/dovecot /etc/
17381748
cp -f $HESTIA_INSTALL_DIR/logrotate/dovecot /etc/logrotate.d/
1739-
if [ "$release" = '18.04' ] || [ "$release" = '20.04' ]; then
1740-
rm -f /etc/dovecot/conf.d/15-mailboxes.conf
1741-
fi
1749+
rm -f /etc/dovecot/conf.d/15-mailboxes.conf
1750+
17421751
chown -R root:root /etc/dovecot*
17431752

17441753
#Alter config for 2.2

src/hst_autocompile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ fi
215215
echo "Build version $BUILD_VER, with Nginx version $NGINX_V and PHP version $PHP_V"
216216

217217
HESTIA_V="${BUILD_VER}_${BUILD_ARCH}"
218-
OPENSSL_V='1.1.1l'
218+
OPENSSL_V='1.1.1n'
219219
PCRE_V='10.39'
220220
ZLIB_V='1.2.11'
221221

0 commit comments

Comments
 (0)