Skip to content

Commit 8bd7d12

Browse files
author
Kristan Kenney
authored
Revert "Fix hestiacp#1767 Limit Web aliases"
1 parent 02f9375 commit 8bd7d12

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

bin/v-add-web-domain

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ check_args '2' "$#" 'USER DOMAIN [IP] [RESTART] [ALIASES] [PROXY_EXTENSIONS]'
5252
is_format_valid 'user' 'domain' 'aliases' 'ip' 'proxy_ext'
5353
is_object_valid 'user' 'USER' "$user"
5454
is_object_unsuspended 'user' 'USER' "$user"
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'
55+
is_package_full 'WEB_DOMAINS' 'WEB_ALIASES'
5956

6057
if [ "$($BIN/v-list-web-domain $user $domain_utf plain |cut -f 1) " != "$domain" ]; then
6158
is_domain_new 'web' "$domain_utf,$aliases"

bin/v-add-web-domain-alias

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ 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-
4744
if [ -z "$aliases" ]; then
4845
check_result $E_INVALID "invalid alias format: empty"
4946
fi
@@ -68,6 +65,9 @@ check_hestia_demo_mode
6865
# Action #
6966
#----------------------------------------------------------#
7067

68+
# Parsing domain values
69+
get_domain_values 'web'
70+
7171
# Preparing domain values for the template substitution
7272
local_ip=$(get_real_ip $IP)
7373
if [ -z "$ALIAS" ]; then

func/main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ is_system_enabled() {
169169
is_package_full() {
170170
case "$1" in
171171
WEB_DOMAINS) used=$(wc -l $USER_DATA/web.conf);;
172-
WEB_ALIASES) used=$(echo $ALIAS |tr ',' '\n' | wc -l );;
172+
WEB_ALIASES) used=$(echo $aliases |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);;

0 commit comments

Comments
 (0)