Skip to content

Commit ebe83a5

Browse files
author
Kristan Kenney
committed
Merge branch 'fix/2020-10_upgrade-rebuild' into staging/fixes
2 parents e1b8d61 + da8edee commit ebe83a5

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

bin/v-update-mail-templates

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: update mail templates
3-
# options: [RESTART]
3+
# options: [RESTART] [SKIP]
44
#
55
# The function for obtaining updated pack of mail templates.
66

@@ -11,6 +11,7 @@
1111

1212
# Argument definition
1313
restart=$1
14+
skip=$2
1415

1516
# Includes
1617
source $HESTIA/func/main.sh
@@ -24,12 +25,13 @@ source $HESTIA/conf/hestia.conf
2425
cp -rf $HESTIA_INSTALL_DIR/templates/mail $HESTIA/data/templates/
2526

2627
# Rebuild mail domains if mail services are enabled
27-
if [ ! -z $MAIL_SYSTEM ]; then
28-
for user in $($HESTIA/bin/v-list-sys-users plain); do
29-
$BIN/v-rebuild-mail-domains $user no
30-
done
28+
if [ ! -z "$skip" ]; then
29+
if [ ! -z $MAIL_SYSTEM ]; then
30+
for user in $($HESTIA/bin/v-list-sys-users plain); do
31+
$BIN/v-rebuild-mail-domains $user no
32+
done
33+
fi
3134
fi
32-
3335
#----------------------------------------------------------#
3436
# Hestia #
3537
#----------------------------------------------------------#

bin/v-update-web-templates

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: update web templates
3-
# options: [RESTART]
3+
# options: [RESTART] [SKIP]
44
#
55
# The function for obtaining updated pack of web templates.
66

@@ -11,6 +11,7 @@
1111

1212
# Argument definition
1313
restart=$1
14+
skip=$2
1415

1516
# Includes
1617
source $HESTIA/func/main.sh
@@ -43,10 +44,11 @@ for php_ver in $(ls /etc/php/); do
4344
done
4445

4546
# Rebuilding web domains
46-
for user in $($BIN/v-list-sys-users plain); do
47-
$BIN/v-rebuild-web-domains $user no
48-
done
49-
47+
if [ ! -z "$skip" ]; then
48+
for user in $($BIN/v-list-sys-users plain); do
49+
$BIN/v-rebuild-web-domains $user no
50+
done
51+
fi
5052

5153
#----------------------------------------------------------#
5254
# Hestia #

func/upgrade.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,14 +609,14 @@ upgrade_filemanager_update_config() {
609609
upgrade_rebuild_web_templates() {
610610
if [ "$UPGRADE_UPDATE_WEB_TEMPLATES" = "true" ]; then
611611
echo "[ ! ] Updating default web domain templates..."
612-
$BIN/v-update-web-templates
612+
$BIN/v-update-web-templates "no" "skip"
613613
fi
614614
}
615615

616616
upgrade_rebuild_mail_templates() {
617617
if [ "$UPGRADE_UPDATE_MAIL_TEMPLATES" = "true" ]; then
618618
echo "[ ! ] Updating default mail domain templates..."
619-
$BIN/v-update-mail-templates
619+
$BIN/v-update-mail-templates "no" "skip"
620620
fi
621621
}
622622

0 commit comments

Comments
 (0)