Skip to content

Commit 48c03ed

Browse files
committed
Merge branch 'main' into release
2 parents bd3ee31 + a8ea93e commit 48c03ed

Some content is hidden

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

43 files changed

+1706
-169
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [1.4.11] - Service release
5+
6+
### Features
7+
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+
14+
### Bugfixes
15+
16+
- 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)
22+
423
## [1.4.10] - Service release
524

625
### Features
@@ -15,6 +34,8 @@ All notable changes to this project will be documented in this file.
1534
- Fixed an issue with deleting multiple mail accounts (#2047)
1635
- Fixed an issue with phpmailer + non latin characters (#2050) thanks @Faymir
1736
- Remove caching template for CraftCMS (#2039) @anvme
37+
- Fixed an issue with phpmailer + non latin characters (#2050) thanks @Faymir
38+
- Fix Unable to load dynamic library 'pdo_mysql.so' after php reinstalling (#2069)
1839

1940
## [1.4.9] - Service release
2041

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.8 | [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-sys-roundcube

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if [ "$UPDATE" == "no" ]; then
8989
[ ! -f "${RC_INSTALL_DIR}/${RC_FILE}" ] && wget "$RC_URL" --retry-connrefused --quiet -O "${RC_INSTALL_DIR}/${RC_FILE}"
9090

9191
tar xzf $RC_FILE
92-
cp -rf $RC_EXTRACT/* $RC_INSTALL_DIR
92+
cp -rT $RC_EXTRACT $RC_INSTALL_DIR
9393

9494
# Delete old config folder
9595
cp $RC_INSTALL_DIR/config/defaults.inc.php $RC_CONFIG_DIR/defaults.inc.php
@@ -111,11 +111,20 @@ if [ "$UPDATE" == "no" ]; then
111111
ln -s $RC_CONFIG_DIR/plugins/newmail_notifier/config.inc.php ./plugins/newmail_notifier/config.inc.php
112112
cp -f $HESTIA_INSTALL_DIR/roundcube/plugins/config_zipdownload.inc.php $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php
113113
ln -s $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php ./plugins/zipdownload/config.inc.php
114+
# Set up correct permissions roundcube
115+
chown -R root:www-data $RC_CONFIG_DIR/
116+
chmod 751 -R $RC_CONFIG_DIR
117+
chmod 644 $RC_CONFIG_DIR/config.inc.php
118+
chmod 644 $RC_CONFIG_DIR/plugins/password/config.inc.php
119+
chmod 644 $RC_CONFIG_DIR/plugins/newmail_notifier/config.inc.php
120+
chmod 644 $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php
114121

122+
# Add robots.txt
123+
echo "User-agent: *" > /var/lib/roundcube/robots.txt
124+
echo "Disallow: /" >> /var/lib/roundcube/robots.txt
115125

116-
chmod 640 $RC_CONFIG_DIR/config.inc.php
117-
chown root:www-data $RC_CONFIG_DIR/config.inc.php
118-
126+
chown -R root:www-data $RC_INSTALL_DIR
127+
119128
# Log file
120129
if [ ! -d $RC_LOG ];then
121130
mkdir $RC_LOG
@@ -146,10 +155,6 @@ if [ "$UPDATE" == "no" ]; then
146155
rm -f -r $RC_INSTALL_DIR/$RC_FILE;
147156
rm -f -r $RC_INSTALL_DIR/$RC_EXTRACT;
148157

149-
# Add robots.txt
150-
echo "User-agent: *" > /var/lib/roundcube/robots.txt
151-
echo "Disallow: /" >> /var/lib/roundcube/robots.txt
152-
153158
# Updating hestia.conf
154159
if [ -z "$(grep WEBMAIL_SYSTEM $HESTIA/conf/hestia.conf)" ]; then
155160
$BIN/v-change-sys-config-value 'WEBMAIL_SYSTEM' 'roundcube'
@@ -165,27 +170,22 @@ if [ "$UPDATE" == "no" ]; then
165170

166171
phpenmod mcrypt > /dev/null 2>&1
167172
else
168-
rm -f -r $RC_INSTALL_DIR
169-
mkdir $RC_INSTALL_DIR
170173
cd "$RC_INSTALL_DIR"
171174
[ ! -f "${RC_INSTALL_DIR}/${RC_FILE}" ] && wget "$RC_URL" --quiet -O "${RC_INSTALL_DIR}/${RC_FILE}"
172175

173176
tar xzf $RC_FILE
174-
cp -rf $RC_EXTRACT/* $RC_INSTALL_DIR
175177

176-
cp -f $RC_INSTALL_DIR/config/defaults.inc.php $RC_CONFIG_DIR/defaults.inc.php
177-
rm -f -r $RC_INSTALL_DIR/config/
178-
ln -s $RC_CONFIG_DIR/ ./config
179-
180-
ln -s $RC_CONFIG_DIR/plugins/password/config.inc.php ./plugins/password/config.inc.php
181-
ln -s $RC_CONFIG_DIR/plugins/newmail_notifier/config.inc.php ./plugins/newmail_notifier/config.inc.php
182-
ln -s $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php ./plugins/zipdownload/config.inc.php
178+
# Run Roundcube upgrade script
179+
$RC_INSTALL_DIR/$RC_EXTRACT/bin/installto.sh -y $RC_INSTALL_DIR > /dev/null 2>&1
180+
$RC_INSTALL_DIR/bin/update.sh --version "$version" > /dev/null 2>&1
181+
chown -R root:www-data $RC_INSTALL_DIR
183182

184-
$RC_INSTALL_DIR/bin/update.sh --version "$version"
185-
186-
rm -f -r $RC_INSTALL_DIR/installer;
187-
rm -f -r $RC_INSTALL_DIR/$RC_FILE;
188-
rm -f -r $RC_INSTALL_DIR/$RC_EXTRACT;
183+
#clean up the mess
184+
if [ -d "$RC_INSTALL_DIR/installer" ]; then
185+
rm -f -r $RC_INSTALL_DIR/installer
186+
fi
187+
rm -f -r $RC_INSTALL_DIR/$RC_FILE
188+
rm -f -r $RC_INSTALL_DIR/$RC_EXTRACT
189189
fi
190190
#----------------------------------------------------------#
191191
# Logging #

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

0 commit comments

Comments
 (0)