Skip to content

Commit 33b55c6

Browse files
committed
Merge branch 'main' into feature/improve-mail-system-tls
2 parents 68320a6 + 26934cb commit 33b55c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1682
-141
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
## [Development]
4+
## [1.4.11] - Service release
55

66
### Features
77

8+
- Added support for Debian 11 (Bullseye) #1611
9+
- Added support for openssl in hestia-php
10+
- Use hestia-php for installing dependencies to solve issue user configurations (hestia-php 7.4.22 required)
11+
- Replace old firewall system with systemd service / startup script #2064 @myrevery
12+
- Add Quick installers for GravCMS, Docuwiki and Mediawiki (#2002) @PsychotherapistSam
13+
814
### Bugfixes
915

1016
- Improve handling upgrade of Roundcube #1917
17+
- Fix an issue with sorting the update scripts when version goes higher then 1.x.10
18+
- Allow the use of multiple CAA records for domain. #2073
19+
- Add missing group (www-data) to migrate_phpmyadmin script #2077 @bet0x
20+
- Fix an issue where news@domain.com get forwarded to /var/spool/news
21+
- Synced up translations with HestiaCP (IT, PL, RU, SK and ZN-CN updated)
1122

1223
## [1.4.10] - Service release
1324

@@ -22,6 +33,7 @@ All notable changes to this project will be documented in this file.
2233
- Fixed security issues in caching templates of Nginx when used as Reverse Proxy
2334
- Fixed an issue with deleting multiple mail accounts (#2047)
2435
- Fixed an issue with phpmailer + non latin characters (#2050) thanks @Faymir
36+
- Fix Unable to load dynamic library 'pdo_mysql.so' after php reinstalling (#2069)
2537

2638
## [1.4.9] - Service release
2739

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[Hestia Control Panel](https://www.hestiacp.com/)
44
==================================================
5-
**Latest stable release:** Version 1.4.10 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md) | [![Build Status](https://drone.hestiacp.com/api/badges/hestiacp/hestiacp/status.svg?ref=refs/heads/main)](https://drone.hestiacp.com/hestiacp/hestiacp) <br>
5+
**Latest stable release:** Version 1.4.11 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md) | [![Build Status](https://drone.hestiacp.com/api/badges/hestiacp/hestiacp/status.svg?ref=refs/heads/main)](https://drone.hestiacp.com/hestiacp/hestiacp) <br>
66

77
**Web:** [www.hestiacp.com](https://www.hestiacp.com/)<br>
88
**Documentation:** [docs.hestiacp.com](https://docs.hestiacp.com/)<br>
@@ -22,14 +22,14 @@ Features and Services
2222
* Multiple PHP versions (5.6 - 8.0, 7.4 as default)
2323
* DNS Server (Bind) with clustering capabilities
2424
* POP/IMAP/SMTP mail services with Anti-Virus, Anti-Spam, and Webmail (ClamAV, SpamAssassin, Roundcube, Rainloop)
25-
* MariaDB or PostgreSQL databases
25+
* MariaDB and/or PostgreSQL databases
2626
* Let's Encrypt SSL support with wildcard certificates
2727
* Firewall with brute-force attack detection and IP lists (iptables, fail2ban, and ipset).
2828

2929
Supported platforms and operating systems
3030
----------------------------
3131
* **CPU Architecture:** AMD64 (x86_64 Intel/AMD)
32-
* **Debian:** 10 or 9
32+
* **Debian:** 11, 10 or 9
3333
* **Ubuntu:** 20.04 LTS or 18.04 LTS
3434
* **NOTE:** Hestia Control Panel must be installed on top of a fresh operating system installation to ensure proper functionality.
3535

bin/v-add-letsencrypt-domain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fi
7878
# Set DNS CAA record retrieval commands
7979
if [ ! -z "$DNS_SYSTEM" ]; then
8080
dns_domain=$($BIN/v-list-dns-domains $user | grep $domain | cut -d' ' -f1)
81-
caa_record=$($BIN/v-list-dns-records $user $domain | grep -i "CAA" | cut -d' ' -f1)
81+
caa_record=$($BIN/v-list-dns-records $user $domain | grep -i "CAA" | grep -i "letsencrypt.org" | cut -d' ' -f1 )
8282
fi
8383

8484
if [ -z "$mail" ] || [ "$mail" = 'no' ]; then

bin/v-add-mail-account

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
7272
echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd
7373
fi
7474

75+
# Create mail account folder (mailbox)
76+
mkdir $HOMEDIR/$user/mail/$domain/$account
77+
chown $user:mail $HOMEDIR/$user/mail/$domain/$account
78+
chmod 700 $HOMEDIR/$user/mail/$domain/$account
7579

7680
#----------------------------------------------------------#
7781
# Hestia #

bin/v-add-sys-filemanager

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ check_hestia_demo_mode
6363
# Action #
6464
#----------------------------------------------------------#
6565

66+
openssl_installed=$(/usr/local/hestia/php/bin/php -m | grep openssl);
67+
6668
rm --recursive --force "$FM_INSTALL_DIR"
6769
mkdir -p "$FM_INSTALL_DIR"
6870
cd "$FM_INSTALL_DIR"
@@ -78,7 +80,11 @@ cp --recursive --force ${HESTIA_INSTALL_DIR}/filemanager/filegator/* "${FM_INSTA
7880

7981
chown $user: -R "${FM_INSTALL_DIR}"
8082

81-
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php $COMPOSER_BIN --quiet --no-dev install
83+
if [ -z "$openssl_version" ]; then
84+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php $COMPOSER_BIN --quiet --no-dev install
85+
else
86+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/local/hestia/php/bin/php $COMPOSER_BIN --quiet --no-dev install
87+
fi
8288

8389
# Check if installation was successful, if not abort script and throw error message notification and clean-up
8490
if [ $? -ne 0 ]; then

bin/v-add-sys-phpmailer

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ rm --recursive --force ${PM_INSTALL_DIR}/vendor
6565
mkdir -p ${PM_INSTALL_DIR}/vendor
6666
chown $user: -R ${PM_INSTALL_DIR}/vendor
6767

68-
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php $COMPOSER_BIN --quiet --no-dev install
68+
openssl_installed=$(/usr/local/hestia/php/bin/php -m | grep openssl);
69+
if [ -z "$openssl_version" ]; then
70+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php $COMPOSER_BIN --quiet --no-dev install
71+
else
72+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/local/hestia/php/bin/php $COMPOSER_BIN --quiet --no-dev install
73+
fi
6974

7075
# Check if installation was successful, if not abort script and throw error message notification and clean-up
7176
if [ $? -ne 0 ]; then

bin/v-add-web-php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ check_hestia_demo_mode
5858
# Action #
5959
#----------------------------------------------------------#
6060

61-
mph="php$version-mbstring php$version-bcmath php$version-cli php$version-curl
61+
mph="php$version-common php$version-mbstring php$version-bcmath php$version-cli php$version-curl
6262
php$version-fpm php$version-gd php$version-intl php$version-mysql
6363
php$version-soap php$version-xml php$version-zip php$version-mbstring
6464
php$version-json php$version-bz2 php$version-pspell php$version-imagick php$version-pgsql

bin/v-delete-web-php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ check_hestia_demo_mode
5555
# Action #
5656
#----------------------------------------------------------#
5757

58-
mph="php$version-mbstring php$version-bcmath php$version-cli php$version-curl
59-
php$version-fpm php$version-gd php$version-intl php$version-mysql
60-
php$version-soap php$version-xml php$version-zip php$version-mbstring
61-
php$version-json php$version-bz2 php$version-pspell"
62-
58+
mph="php$version-common php$version-mbstring php$version-bcmath php$version-cli php$version-curl
59+
php$version-fpm php$version-gd php$version-intl php$version-mysql
60+
php$version-soap php$version-xml php$version-zip php$version-mbstring
61+
php$version-json php$version-bz2 php$version-pspell php$version-imagick php$version-pgsql
62+
php$version-imap php$version-ldap"
63+
6364
# Check is version is 7.1 or below to add mcrypt
6465
if [[ `echo "$version 7.2" | awk '{print ($1 < $2)}'` == 1 ]]; then
6566
mph="$mph php$version-mcrypt"

bin/v-stop-firewall

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -76,29 +76,25 @@ if [ -d "/etc/sysconfig" ]; then
7676
fi
7777
else
7878
/sbin/iptables-save > /etc/iptables.rules
79-
routable="/usr/lib/networkd-dispatcher/routable.d/10-hestia-iptables"
80-
preup="/etc/network/if-pre-up.d/hestia-iptables"
81-
# Recreate the Hestia iptables rules loading script
82-
rm -f $routable $preup
83-
if dpkg-query -W -f'${Status}' "netplan*" 2>/dev/null | grep -q "ok installed" && [ -d /etc/netplan ] && [ -n "$(ls -A /etc/netplan 2>/dev/null)" ]; then
84-
echo '#!/bin/sh' > $routable
85-
echo '' >> $routable
86-
echo 'if [ "$IFACE" = "'$(ip route list | awk '/default .+/ {print $5}' | uniq)'" ]; then' >> $routable
87-
echo ' /sbin/iptables-restore < /etc/iptables.rules' >> $routable
88-
echo 'fi' >> $routable
89-
echo '' >> $routable
90-
echo "exit 0" >> $routable
91-
chmod +x $routable
92-
else
93-
echo '#!/bin/sh' > $preup
94-
echo '' >> $preup
95-
echo 'if [ "$IFACE" = "'$(ip route list | awk '/default .+/ {print $5}' | uniq)'" ]; then' >> $preup
96-
echo ' /sbin/iptables-restore < /etc/iptables.rules' >> $preup
97-
echo 'fi' >> $preup
98-
echo '' >> $preup
99-
echo "exit 0" >> $preup
100-
chmod +x $preup
79+
sd_unit="/lib/systemd/system/hestia-iptables.service"
80+
if [ ! -e "$sd_unit" ]; then
81+
echo "[Unit]" >> $sd_unit
82+
echo "Description=Loading Hestia firewall rules" >> $sd_unit
83+
echo "DefaultDependencies=no" >> $sd_unit
84+
echo "Wants=network-pre.target local-fs.target" >> $sd_unit
85+
echo "Before=network-pre.target" >> $sd_unit
86+
echo "After=local-fs.target" >> $sd_unit
87+
echo "" >> $sd_unit
88+
echo "[Service]" >> $sd_unit
89+
echo "Type=oneshot" >> $sd_unit
90+
echo "RemainAfterExit=yes" >> $sd_unit
91+
echo "ExecStartPre=-${HESTIA}/bin/v-update-firewall-ipset" >> $sd_unit
92+
echo "ExecStart=/sbin/iptables-restore /etc/iptables.rules" >> $sd_unit
93+
echo "" >> $sd_unit
94+
echo "[Install]" >> $sd_unit
95+
echo "WantedBy=multi-user.target" >> $sd_unit
10196
fi
97+
systemctl is-enabled hestia-iptables >/dev/null 2>&1 && systemctl disable hestia-iptables >/dev/null 2>&1
10298
fi
10399

104100

bin/v-update-firewall

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if [[ "$sshport" =~ ^[0-9]+$ ]] && [ "$sshport" -ne "22" ]; then
6969
fi
7070

7171
# Load ipset lists before adding Hestia iptables rules
72-
[ -x "$(which ipset)" ] && $BIN/v-update-firewall-ipset
72+
$BIN/v-update-firewall-ipset
7373

7474
# Creating temporary file
7575
tmp=$(mktemp)
@@ -185,31 +185,25 @@ if [ -d "/etc/sysconfig" ]; then
185185
fi
186186
else
187187
/sbin/iptables-save > /etc/iptables.rules
188-
routable="/usr/lib/networkd-dispatcher/routable.d/10-hestia-iptables"
189-
preup="/etc/network/if-pre-up.d/hestia-iptables"
190-
# Recreate the Hestia iptables rules loading script
191-
rm -f $routable $preup
192-
if dpkg-query -W -f'${Status}' "netplan*" 2>/dev/null | grep -q "ok installed" && [ -d /etc/netplan ] && [ -n "$(ls -A /etc/netplan 2>/dev/null)" ]; then
193-
echo '#!/bin/sh' > $routable
194-
echo '' >> $routable
195-
echo 'if [ "$IFACE" = "'$(ip route list | awk '/default .+/ {print $5}' | uniq)'" ]; then' >> $routable
196-
echo ' [ -x "'$(which ipset)'" ] && '"${HESTIA}/bin/v-update-firewall-ipset" >> $routable
197-
echo ' /sbin/iptables-restore < /etc/iptables.rules' >> $routable
198-
echo 'fi' >> $routable
199-
echo '' >> $routable
200-
echo "exit 0" >> $routable
201-
chmod +x $routable
202-
else
203-
echo '#!/bin/sh' > $preup
204-
echo '' >> $preup
205-
echo 'if [ "$IFACE" = "'$(ip route list | awk '/default .+/ {print $5}' | uniq)'" ]; then' >> $preup
206-
echo ' [ -x "'$(which ipset)'" ] && '"${HESTIA}/bin/v-update-firewall-ipset" >> $preup
207-
echo ' /sbin/iptables-restore < /etc/iptables.rules' >> $preup
208-
echo 'fi' >> $preup
209-
echo '' >> $preup
210-
echo "exit 0" >> $preup
211-
chmod +x $preup
188+
sd_unit="/lib/systemd/system/hestia-iptables.service"
189+
if [ ! -e "$sd_unit" ]; then
190+
echo "[Unit]" >> $sd_unit
191+
echo "Description=Loading Hestia firewall rules" >> $sd_unit
192+
echo "DefaultDependencies=no" >> $sd_unit
193+
echo "Wants=network-pre.target local-fs.target" >> $sd_unit
194+
echo "Before=network-pre.target" >> $sd_unit
195+
echo "After=local-fs.target" >> $sd_unit
196+
echo "" >> $sd_unit
197+
echo "[Service]" >> $sd_unit
198+
echo "Type=oneshot" >> $sd_unit
199+
echo "RemainAfterExit=yes" >> $sd_unit
200+
echo "ExecStartPre=-${HESTIA}/bin/v-update-firewall-ipset" >> $sd_unit
201+
echo "ExecStart=/sbin/iptables-restore /etc/iptables.rules" >> $sd_unit
202+
echo "" >> $sd_unit
203+
echo "[Install]" >> $sd_unit
204+
echo "WantedBy=multi-user.target" >> $sd_unit
212205
fi
206+
systemctl is-enabled hestia-iptables >/dev/null 2>&1 || systemctl enable hestia-iptables >/dev/null 2>&1
213207
fi
214208

215209

0 commit comments

Comments
 (0)