Skip to content

Commit 65c47ea

Browse files
author
Kristan Kenney
committed
Fix function in domain.sh
1 parent 79e4a51 commit 65c47ea

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

func/domain.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ add_webmail_config() {
633633
chown root:$user $conf
634634
chmod 640 $conf
635635

636-
if [[ "$2" =~ stpl$ ]]; then
636+
if [ "$2" = "default.stpl" ]; then
637637
if [ ! -z "$WEB_SYSTEM" ]; then
638638
rm -f /etc/$1/conf.d/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
639639
ln -s $conf /etc/$1/conf.d/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
@@ -642,7 +642,6 @@ add_webmail_config() {
642642
rm -f /etc/$1/conf.d/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
643643
ln -s $conf /etc/$1/conf.d/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
644644
fi
645-
646645
# Clear old configurations
647646
rm -rf $HOMEDIR/$user/conf/mail/$domain.*
648647
rm -rf $HOMEDIR/$user/conf/mail/ssl.$domain.*
@@ -656,7 +655,6 @@ add_webmail_config() {
656655
rm -f /etc/$1/conf.d/domains/$WEBMAIL_ALIAS.$domain.conf
657656
ln -s $conf /etc/$1/conf.d/domains/$WEBMAIL_ALIAS.$domain.conf
658657
fi
659-
660658
# Clear old configurations
661659
rm -rf $HOMEDIR/$user/conf/mail/$domain.*
662660
fi

0 commit comments

Comments
 (0)