Просмотр исходного кода

Skip rebuild of mail domains when updating templates

Kristan Kenney 5 лет назад
Родитель
Сommit
da8edeebfa
2 измененных файлов с 9 добавлено и 7 удалено
  1. 8 6
      bin/v-update-mail-templates
  2. 1 1
      func/upgrade.sh

+ 8 - 6
bin/v-update-mail-templates

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: update mail templates
-# options: [RESTART]
+# options: [RESTART] [SKIP]
 #
 # The function for obtaining updated pack of mail templates.
 
@@ -11,6 +11,7 @@
 
 # Argument definition
 restart=$1
+skip=$2
 
 # Includes
 source $HESTIA/func/main.sh
@@ -24,12 +25,13 @@ source $HESTIA/conf/hestia.conf
 cp -rf $HESTIA_INSTALL_DIR/templates/mail $HESTIA/data/templates/
 
 # Rebuild mail domains if mail services are enabled
-if [ ! -z $MAIL_SYSTEM ]; then
-	for user in $($HESTIA/bin/v-list-sys-users plain); do
-		$BIN/v-rebuild-mail-domains $user no
-	done
+if [ ! -z "$skip" ]; then
+	if [ ! -z $MAIL_SYSTEM ]; then
+		for user in $($HESTIA/bin/v-list-sys-users plain); do
+			$BIN/v-rebuild-mail-domains $user no
+		done
+	fi
 fi
-
 #----------------------------------------------------------#
 #                       Hestia                             #
 #----------------------------------------------------------#

+ 1 - 1
func/upgrade.sh

@@ -616,7 +616,7 @@ upgrade_rebuild_web_templates() {
 upgrade_rebuild_mail_templates() {
     if [ "$UPGRADE_UPDATE_MAIL_TEMPLATES" = "true" ]; then
         echo "[ ! ] Updating default mail domain templates..."
-        $BIN/v-update-mail-templates
+        $BIN/v-update-mail-templates "no" "skip"
     fi
 }