Skip to content

Commit 87b3674

Browse files
authored
hestiacp#1236 Improve restart behavoir v-add-domain.com (hestiacp#3020)
* Fix restart issues * Set v-add-mail-domain to no
1 parent eda3258 commit 87b3674

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

bin/v-add-domain

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
user=$1
1515
domain=$2
1616
ip=$3
17-
restart="${4-yes}"
17+
restart=$4
1818

1919
# Includes
2020
# shellcheck source=/etc/hestiacp/hestia.conf
@@ -66,7 +66,7 @@ fi
6666

6767
# Working on mail domain
6868
if [ -n "$MAIL_SYSTEM" ]; then
69-
$BIN/v-add-mail-domain $user $domain
69+
$BIN/v-add-mail-domain $user $domain 'no'
7070
check_result $? "can't add mail domain" >/dev/null
7171
fi
7272

bin/v-add-mail-domain

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ antispam=${3-yes}
1717
antivirus=${4-yes}
1818
dkim=${5-yes}
1919
dkim_size=${6-1024}
20-
restart=${7-yes}
20+
restart="$7"
2121
reject=${8-no}
2222

2323
# Includes
@@ -65,7 +65,7 @@ else
6565
is_domain_new 'mail' "$domain"
6666
fi
6767
if [ -z "$(is_ip_format_valid $domain)" ]; then
68-
echo "Error: Invalid domain format. IP address detected as input."
68+
echo "Error: Invalid domain format. IP address detected as input."
6969
exit 1
7070
fi
7171

@@ -129,8 +129,8 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
129129
if [ -n "$local_ip" ]; then
130130
echo "$local_ip" > $HOMEDIR/$user/conf/mail/$domain/ip
131131
fi
132-
133-
if [ -n "$ANTISPAM_SYSTEM" ]; then
132+
133+
if [ -n "$ANTISPAM_SYSTEM" ]; then
134134
# Adding antispam protection
135135
if [ "$antispam" = 'yes' ]; then
136136
touch "$HOMEDIR/$user/conf/mail/$domain/antispam"
@@ -139,7 +139,7 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
139139
touch "$HOMEDIR/$user/conf/mail/$domain/reject_spam"
140140
fi
141141
fi
142-
142+
143143
if [ -n "$ANTIVIRUS_SYSTEM" ]; then
144144
# Adding antivirus protection
145145
if [ "$antivirus" = 'yes' ]; then
@@ -189,7 +189,7 @@ if [ -n "$WEB_SYSTEM" ] || [ -n "$PROXY_SYSTEM" ]; then
189189
$BIN/v-add-mail-domain-webmail "$user" "$domain" '' 'no'
190190
fi
191191
fi
192-
192+
193193
#----------------------------------------------------------#
194194
# Hestia #
195195
#----------------------------------------------------------#

0 commit comments

Comments
 (0)