Skip to content

Commit da8edee

Browse files
author
Kristan Kenney
committed
Skip rebuild of mail domains when updating templates
1 parent 058220d commit da8edee

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
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
#----------------------------------------------------------#

func/upgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ upgrade_rebuild_web_templates() {
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)