Skip to content

Commit 4cbdb81

Browse files
authored
Merge pull request hestiacp#807 from hestiacp/core-ubuntu-20.04
Add support for Ubuntu Server 20.04
2 parents a0c6f12 + 540f9c0 commit 4cbdb81

File tree

4 files changed

+41
-28
lines changed

4 files changed

+41
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ What does Hestia Control Panel support?
4343
Supported operating systems:
4444
----------------------------
4545
* Debian 8, 9, 10
46-
* Ubuntu 16.04 LTS or Ubuntu 18.04 LTS (the latest LTS release is recommended)
46+
* Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, or Ubuntu 20.04 LTS (the latest LTS release is generally recommended)
4747
* **NOTE:** Hestia Control Panel must be installed on top of a fresh operating system installation to ensure proper functionality.
4848

4949
Installing Hestia Control Panel

install/hst-install-ubuntu.sh

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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
4748
help() {
@@ -561,9 +562,6 @@ echo
561562
# Installing Nginx repo
562563
if [ "$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
581579
fi
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//")
795793
fi
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/")
799796
fi
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
906909
ntpdate -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
911920
fi
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
11771184
else
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
@@ -1362,7 +1370,7 @@ fi
13621370
#----------------------------------------------------------#
13631371

13641372
if [ "$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
16681681
fi
16691682

16701683
# Configuring MariaDB host

install/hst-install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Currently Supported Operating Systems:
77
#
88
# Debian 8, 9, 10
9-
# Ubuntu 16.04, 18.04
9+
# Ubuntu 16.04, 18.04, 20.04
1010
#
1111

1212
# Am I root?
@@ -62,7 +62,7 @@ no_support_message(){
6262
echo "Hestia Control Panel. Officially supported releases:"
6363
echo "****************************************************"
6464
echo " Debian 8, 9, 10"
65-
echo " Ubuntu 16.04 LTS, 18.04 LTS"
65+
echo " Ubuntu 16.04 LTS, 18.04, 20.04 LTS"
6666
echo ""
6767
exit 1;
6868
}
@@ -99,7 +99,7 @@ check_wget_curl(){
9999

100100
# Check for supported operating system before proceeding with download
101101
# of OS-specific installer, and throw error message if unsupported OS detected.
102-
if [[ "$release" =~ ^(8|9|10|16.04|18.04)$ ]]; then
102+
if [[ "$release" =~ ^(8|9|10|16.04|18.04|20.04)$ ]]; then
103103
check_wget_curl $*
104104
else
105105
no_support_message

src/hst_autocompile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ mkdir -p $DEB_DIR
9898
mkdir -p $ARCHIVE_DIR
9999

100100
# Set package dependencies for compiling
101-
SOFTWARE='build-essential libxml2-dev libz-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config'
101+
SOFTWARE='build-essential libxml2-dev libz-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config libsqlite3-dev libonig-dev'
102102

103103
# Define a timestamp function
104104
timestamp() {

0 commit comments

Comments
 (0)