Skip to content

Commit 4957da8

Browse files
authored
Release 0.9.8-28
2 parents 1685cb6 + 9d2edff commit 4957da8

File tree

145 files changed

+12962
-401
lines changed

Some content is hidden

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

145 files changed

+12962
-401
lines changed

ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Type here (e.g. A list of hosted web domains should appear).
1313
Type here (e.g. Ubuntu 18.04 LTS)
1414

1515
### HestiaCP Version:
16-
Type here (e.g. 0.9.8-27)
16+
Type here (e.g. 0.9.8-28)
1717

1818
### What software is installed?
1919
Type here (e.g. Apache, Nginx, PHP-FPM, Dovecot/Exim, MariaDB, etc.)

bin/v-change-web-domain-backend-tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ is_backend_template_valid $template
4848
prepare_web_backend
4949

5050
# Deleting backend
51-
rm -f $pool/$backend_type.conf
51+
delete_web_backend
5252

5353
# Allocating backend port
5454
backend_port=9000

bin/v-delete-web-domain-backend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if [ "$WEB_BACKEND_POOL" = 'user' ]; then
6363
fi
6464

6565
# Deleting backend
66-
rm -f $pool/$backend_type.conf
66+
delete_web_backend
6767

6868

6969
#----------------------------------------------------------#

bin/v-rebuild-web-domains

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ fi
6262
if [ ! -z "$WEB_BACKEND" ]; then
6363
if [ "$WEB_BACKEND_POOL" = 'user' ]; then
6464
prepare_web_backend
65-
rm -f $pool/$backend_type.conf
65+
delete_web_backend
6666
else
6767
for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do
6868
prepare_web_backend
69-
rm -f $pool/$backend_type.conf
69+
delete_web_backend
7070
done
7171
fi
7272
fi

bin/v-restart-web-backend

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@ if [ -z "$WEB_BACKEND" ] || [ "$WEB_BACKEND" = 'remote' ]; then
5050
fi
5151

5252
# Restart system
53-
php_fpm=$(ls /etc/init.d/php*-fpm 2>/dev/null |cut -f 4 -d / |head -n 1)
54-
if [ -z "$php_fpm" ]; then
55-
service $WEB_BACKEND restart >/dev/null 2>&1
56-
else
57-
service $php_fpm restart >/dev/null 2>&1
58-
fi
59-
53+
php_fpm=$(ls /etc/init.d/php*-fpm* 2>/dev/null |cut -f 4 -d /)
54+
for back in $php_fpm
55+
do
56+
if [ -z "$php_fpm" ]; then
57+
service $WEB_BACKEND restart >/dev/null 2>&1
58+
else
59+
service $back restart >/dev/null 2>&1
60+
fi
61+
done
6062
if [ $? -ne 0 ]; then
6163
send_email_report
6264
check_result $E_RESTART "$WEB_BACKEND restart failed"

bin/v-restore-user

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,11 @@ if [ "$cron" != 'no' ] && [ ! -z "CRON_SYSTEM" ]; then
690690
echo -e "$(date "+%F %T") $jobs cron jobs"|tee -a $tmpdir/restore.log
691691
fi
692692

693+
# Replace paths from vesta to hestia
694+
if [ "$backup_system" == 'vesta' ] && [ "$user" == 'admin' ]; then
695+
sed -i 's/vesta/hestia/g' $tmpdir/cron/cron.conf
696+
fi
697+
693698
# Restoring cron jobs
694699
cp $tmpdir/cron/cron.conf $USER_DATA/cron.conf
695700

bin/v-update-firewall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ echo "$iptables -P INPUT ACCEPT" >> $tmp
6464
echo "$iptables -F INPUT" >> $tmp
6565

6666
# Enabling stateful support
67-
if [ "$conntrack" != 'no' ]; then
67+
if [ "$conntrack" != 'no' ] || grep --quiet container=lxc /proc/1/environ; then
6868
str="$iptables -A INPUT -m state"
6969
str="$str --state ESTABLISHED,RELATED -j ACCEPT"
7070
echo "$str" >> $tmp

func/domain.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,22 @@ is_web_alias_new() {
8484

8585
# Prepare web backend
8686
prepare_web_backend() {
87-
pool=$(find -L /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \))
87+
pool=$(find -L /etc/php/ -name "$domain.conf" -exec dirname {} \;)
88+
89+
# Check if multiple-PHP installed
90+
regex="socket-(\d+)_(\d+)"
91+
if [[ $template =~ ^socket-([0-9])\_([0-9])$ ]]
92+
then
93+
version="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
94+
pool=$(find -L /etc/php/$version -type d \( -name "pool.d" -o -name "*fpm.d" \))
95+
else
96+
if [ "$pool" == "" ]
97+
then
98+
version=`echo "<?php echo (float)phpversion();" | php`
99+
pool=$(find -L /etc/php/$version -type d \( -name "pool.d" -o -name "*fpm.d" \))
100+
fi
101+
fi
102+
88103
if [ ! -e "$pool" ]; then
89104
check_result $E_NOTEXIST "php-fpm pool doesn't exist"
90105
fi
@@ -102,6 +117,11 @@ prepare_web_backend() {
102117
fi
103118
}
104119

120+
# Delete web backend
121+
delete_web_backend() {
122+
find -L /etc/php/ -type f -name "$backend_type.conf" -exec rm -f {} \;
123+
}
124+
105125
# Prepare web aliases
106126
prepare_web_aliases() {
107127
i=1

install/hst-install-debian.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1662,8 +1662,9 @@ we hope that you enjoy it as much as we do!
16621662
Please feel free to contact us at any time if you have any questions,
16631663
or if you encounter any bugs or problems:
16641664
1665-
E-mail: info@hestiacp.com
1665+
E-Mail: info@hestiacp.com
16661666
Web: https://www.hestiacp.com/
1667+
Forum: https://www.hestiacp.com/
16671668
GitHub: https://www.github.com/hestiacp/hestiacp
16681669
16691670
--

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,8 +1576,9 @@ we hope that you enjoy it as much as we do!
15761576
Please feel free to contact us at any time if you have any questions,
15771577
or if you encounter any bugs or problems:
15781578
1579-
E-mail: info@hestiacp.com
1579+
E-Mail: info@hestiacp.com
15801580
Web: https://www.hestiacp.com/
1581+
Forum: https://www.hestiacp.com/
15811582
GitHub: https://www.github.com/hestiacp/hestiacp
15821583
15831584
--

0 commit comments

Comments
 (0)