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
915915fi
916916if [ " $release " = ' 20.04' ]; then
917917 software=$( echo " $software " | sed -e " s/setpriv/util-linux/" )
918- software=$( echo " $software " | sed -e " s/rssh//" )
919918fi
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
10371040systemctl enable systemd-timesyncd
10381041systemctl 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
10521044if [ ! -e " /sbin/iptables" ]; then
10531045 if which iptables; then
@@ -1303,9 +1295,13 @@ else
13031295 ' San Francisco' ' Hestia Control Panel' ' IT' > /tmp/hst.pem
13041296fi
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
13111307echo " [ * ] 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
15221527fi
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
16961701if [ " $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
0 commit comments