Skip to content

Commit ef9ad19

Browse files
author
Kristan Kenney
committed
Merge remote-tracking branch 'Lupul/bugfix-0510' into develop
2 parents 3f8088c + 52e80b0 commit ef9ad19

File tree

4 files changed

+29
-31
lines changed

4 files changed

+29
-31
lines changed

bin/v-rebuild-mail-domains

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ U_MAIL_SSL=0
4545
SUSPENDED_MAIL=0
4646
U_DISK_MAIL=0
4747

48-
# Update mail templates
49-
$BIN/v-update-mail-templates
50-
5148
# Checking mail folder
5249
if [ ! -d "$USER_DATA/mail" ]; then
5350
rm -f $USER_DATA/mail

bin/v-update-mail-templates

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ fi
4040
# Update templates
4141
cp -rf $HESTIA/install/$type/templates/mail $HESTIA/data/templates/
4242

43+
# Rebuilding mail domains
44+
for user in $($BIN/v-list-sys-users plain); do
45+
$BIN/v-rebuild-mail-domains $user no
46+
done
47+
4348
#----------------------------------------------------------#
4449
# Hestia #
4550
#----------------------------------------------------------#

bin/v-update-web-templates

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,21 @@ fi
4141
cp -rf $HESTIA/install/$type/templates/web $HESTIA/data/templates/
4242

4343
# Update Multi-PHP templates
44-
if [ -d "/etc/php/*/fpm" ]; then
45-
php_versions=$(ls /etc/php/*/fpm -d | wc -l)
46-
if [ "$php_versions" -gt 1 ]; then
47-
if [ "$WEB_SYSTEM" = "nginx" ]; then
48-
for tplname in $(ls $HESTIA/data/templates/web/$WEB_SYSTEM/ | grep -v 'default'); do
49-
rm -fr $HESTIA/data/templates/web/$WEB_SYSTEM/$tplname
50-
done
51-
fi
52-
for v in $(ls /etc/php/); do
53-
if [ ! -d "/etc/php/$v/fpm/pool.d/" ]; then
54-
continue
55-
fi
56-
v_tpl=$(echo "$v" | sed -e 's/[.]//')
57-
cp -f $HESTIA/install/$type/multiphp/$WEB_SYSTEM/PHP-$v_tpl.* $HESTIA/data/templates/web/$WEB_SYSTEM/
44+
php_versions=$(ls /etc/php/*/fpm -d 2>/dev/null | wc -l)
45+
if [ "$php_versions" -gt 1 ]; then
46+
if [ "$WEB_SYSTEM" = "nginx" ]; then
47+
for tplname in $(ls $HESTIA/data/templates/web/$WEB_SYSTEM/ | grep -v 'default'); do
48+
rm -fr $HESTIA/data/templates/web/$WEB_SYSTEM/$tplname
5849
done
59-
chmod a+x $HESTIA/data/templates/web/$WEB_SYSTEM/*.sh
6050
fi
51+
for v in $(ls /etc/php/); do
52+
if [ ! -d "/etc/php/$v/fpm/pool.d/" ]; then
53+
continue
54+
fi
55+
v_tpl=$(echo "$v" | sed -e 's/[.]//')
56+
cp -f $HESTIA/install/$type/multiphp/$WEB_SYSTEM/PHP-$v_tpl.* $HESTIA/data/templates/web/$WEB_SYSTEM/
57+
done
58+
chmod a+x $HESTIA/data/templates/web/$WEB_SYSTEM/*.sh
6159
fi
6260

6361
# Rebuilding web domains

install/upgrade/0.10.0-190430.sh

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,17 @@ if [ "$PROXY_SYSTEM" = "nginx" ]; then
191191
fi
192192

193193
# Fix empty pool error message for MultiPHP
194-
if [ -d "/etc/php/*/fpm" ]; then
195-
php_versions=$(ls /etc/php/*/fpm -d | wc -l)
196-
if [ "$php_versions" -gt 1 ]; then
197-
for v in $(ls /etc/php/); do
198-
if [ ! -d "/etc/php/$v/fpm/pool.d/" ]; then
199-
continue
200-
fi
201-
echo "(*) Updating Multi-PHP configuration..."
202-
cp -f $hestiacp/php-fpm/dummy.conf /etc/php/$v/fpm/pool.d/
203-
v1=$(echo "$v" | sed -e 's/[.]//')
204-
sed -i "s/9999/99$v1/g" /etc/php/$v/fpm/pool.d/dummy.conf
205-
done
206-
fi
194+
php_versions=$(ls /etc/php/*/fpm -d 2>/dev/null |wc -l)
195+
if [ "$php_versions" -gt 1 ]; then
196+
for v in $(ls /etc/php/); do
197+
if [ ! -d "/etc/php/$v/fpm/pool.d/" ]; then
198+
continue
199+
fi
200+
echo "(*) Updating Multi-PHP configuration..."
201+
cp -f $hestiacp/php-fpm/dummy.conf /etc/php/$v/fpm/pool.d/
202+
v1=$(echo "$v" | sed -e 's/[.]//')
203+
sed -i "s/9999/99$v1/g" /etc/php/$v/fpm/pool.d/dummy.conf
204+
done
207205
fi
208206

209207
# Set Purge to false in Roundcube configuration - https://goo.gl/3Nja3u

0 commit comments

Comments
 (0)