Skip to content

Commit 805d270

Browse files
authored
Fix/2021 03 fix rebuild when updating templates (hestiacp#1664)
* Fix issue with rebuil users after v-update-{task]-templates * Add tabbing
1 parent 5309d26 commit 805d270

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

bin/v-update-mail-templates

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ source $HESTIA/conf/hestia.conf
2828
cp -rf $HESTIA_INSTALL_DIR/templates/mail $HESTIA/data/templates/
2929

3030
# Rebuild mail domains if mail services are enabled
31-
if [ ! -z "$skip" ]; then
31+
if [ -z "$skip" ]; then
3232
if [ ! -z $MAIL_SYSTEM ]; then
3333
for user in $($HESTIA/bin/v-list-sys-users plain); do
3434
$BIN/v-rebuild-mail-domains $user no
@@ -39,11 +39,13 @@ fi
3939
# Hestia #
4040
#----------------------------------------------------------#
4141

42-
# Restarting web server
43-
$BIN/v-restart-web $restart
44-
check_result $? "restart" >/dev/null 2>&1
45-
46-
$BIN/v-restart-proxy $restart
47-
check_result $? "restart" >/dev/null 2>&1
42+
if [ ! -z "$restart" ] || [ "$restart" == "yes" ]; then
43+
# Restarting web server
44+
$BIN/v-restart-web $restart
45+
check_result $? "restart" >/dev/null 2>&1
46+
47+
$BIN/v-restart-proxy $restart
48+
check_result $? "restart" >/dev/null 2>&1
49+
fi
4850

4951
exit

bin/v-update-web-templates

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ for php_ver in $(ls /etc/php/); do
4747
done
4848

4949
# Rebuilding web domains
50-
if [ ! -z "$skip" ]; then
50+
if [ -z "$skip" ]; then
5151
for user in $($BIN/v-list-sys-users plain); do
5252
$BIN/v-rebuild-web-domains $user no
5353
done
@@ -57,11 +57,12 @@ fi
5757
# Hestia #
5858
#----------------------------------------------------------#
5959

60-
# Restarting web server
61-
$BIN/v-restart-web $restart
62-
check_result $? "restart" >/dev/null 2>&1
63-
64-
$BIN/v-restart-proxy $restart
65-
check_result $? "restart" >/dev/null 2>&1
66-
60+
if [ ! -z "$restart" ] || [ "$restart" == "yes" ]; then
61+
# Restarting web server
62+
$BIN/v-restart-web $restart
63+
check_result $? "restart" >/dev/null 2>&1
64+
65+
$BIN/v-restart-proxy $restart
66+
check_result $? "restart" >/dev/null 2>&1
67+
fi
6768
exit

0 commit comments

Comments
 (0)