File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,10 @@ check_args '2' "$#" 'USER DOMAIN [IP] [RESTART] [ALIASES] [PROXY_EXTENSIONS]'
5252is_format_valid ' user' ' domain' ' aliases' ' ip' ' proxy_ext'
5353is_object_valid ' user' ' USER' " $user "
5454is_object_unsuspended ' user' ' USER' " $user "
55- is_package_full ' WEB_DOMAINS' ' WEB_ALIASES'
55+ # Make the new aliases are also counted for when creating a new domain.
56+ ALIAS=$aliases
57+ is_package_full ' WEB_DOMAINS'
58+ is_package_full ' WEB_ALIASES'
5659
5760if [ " $( $BIN /v-list-web-domain $user $domain_utf plain | cut -f 1) " != " $domain " ]; then
5861 is_domain_new ' web' " $domain_utf ,$aliases "
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ format_aliases
4141# Verifications #
4242# ----------------------------------------------------------#
4343
44+ # Parsing domain values as they are used to get the current alias usage
45+ get_domain_values ' web'
46+
4447if [ -z " $aliases " ]; then
4548 check_result $E_INVALID " invalid alias format: empty"
4649fi
@@ -65,9 +68,6 @@ check_hestia_demo_mode
6568# Action #
6669# ----------------------------------------------------------#
6770
68- # Parsing domain values
69- get_domain_values ' web'
70-
7171# Preparing domain values for the template substitution
7272local_ip=$( get_real_ip $IP )
7373if [ -z " $ALIAS " ]; then
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ is_system_enabled() {
169169is_package_full () {
170170 case " $1 " in
171171 WEB_DOMAINS) used=$( wc -l $USER_DATA /web.conf) ;;
172- WEB_ALIASES) used=$( echo $aliases | tr ' ,' ' \n' | wc -l) ;;
172+ WEB_ALIASES) used=$( echo $ALIAS | tr ' ,' ' \n' | wc -l ) ;;
173173 DNS_DOMAINS) used=$( wc -l $USER_DATA /dns.conf) ;;
174174 DNS_RECORDS) used=$( wc -l $USER_DATA /dns/$domain .conf) ;;
175175 MAIL_DOMAINS) used=$( wc -l $USER_DATA /mail.conf) ;;
You can’t perform that action at this time.
0 commit comments