Skip to content

Commit 1aac728

Browse files
author
Kristan Kenney
committed
Fix mail template update process
Only trigger mail domain rebuild if mail services are installed on the server, otherwise the script will only update the template set on the file system.
1 parent d202c52 commit 1aac728

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bin/v-update-mail-templates

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ 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
43+
# Rebuild mail domains if mail services are enabled
44+
if [ ! -z $MAIL_SYSTEM ]; then
45+
for user in $($BIN/v-list-sys-users plain); do
46+
$BIN/v-rebuild-mail-domains $user no
47+
done
48+
fi
4749

4850
#----------------------------------------------------------#
4951
# Hestia #

0 commit comments

Comments
 (0)