Skip to content

Commit 3c47527

Browse files
committed
Merge pull request hestiacp#192 from estratos/master
Fix Error Page Not Available on Success hestiacp#191
2 parents f755707 + e00ed17 commit 3c47527

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

bin/v-add-domain

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Variable&Function #
1010
#----------------------------------------------------------#
1111

12-
# Argument defenition
12+
# Argument definition
1313
user=$1
1414
domain=$2
1515
ip=$3
@@ -48,29 +48,31 @@ if [ -z "$ip" ]; then
4848
fi
4949

5050
# Web domain
51+
# Do Not restart at this point, will loose connection from API calls
5152
if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
52-
$BIN/v-add-web-domain $user $domain $ip
53-
retun_code=$?
53+
$BIN/v-add-web-domain $user $domain $ip no
54+
return_code=$?
5455
fi
5556

5657
# Proxy support
57-
if [ ! -z "$PROXY_SYSTEM" ] && [ "$retun_code" -eq 0 ]; then
58-
$BIN/v-add-web-domain-proxy $user $domain
58+
# Do Not restart at this point, will loose connection from API calls
59+
if [ ! -z "$PROXY_SYSTEM" ] && [ "$return_code" -eq 0 ]; then
60+
$BIN/v-add-web-domain-proxy $user $domain '' '' no
5961
fi
6062

6163
# DNS domain
6264
if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS_SYSTEM" != 'no' ]; then
63-
if [ "$retun_code" -eq 0 ]; then
65+
if [ "$return_code" -eq 0 ]; then
6466
$BIN/v-add-dns-domain $user $domain $ip
65-
retun_code=$?
67+
return_code=$?
6668
fi
6769
fi
6870

6971
# Mail domain
7072
if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL_SYSTEM" != 'no' ]; then
71-
if [ "$retun_code" -eq 0 ]; then
73+
if [ "$return_code" -eq 0 ]; then
7274
$BIN/v-add-mail-domain $user $domain
73-
retun_code=$?
75+
return_code=$?
7476
fi
7577
fi
7678

@@ -79,4 +81,4 @@ fi
7981
# Vesta #
8082
#----------------------------------------------------------#
8183

82-
exit $retun_code
84+
exit $return_code

0 commit comments

Comments
 (0)