Skip to content

Commit ae9da60

Browse files
committed
fixed new alias validation
1 parent e828e25 commit ae9da60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

func/domain.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ is_domain_new() {
5252
if [ ! -z "$check_all" ]; then
5353
check_ownership=$(grep -w $dom $USER_DATA/*.conf)
5454
if [ ! -z "$check_ownership" ]; then
55-
check_type=$(grep -w $dom $USER_DATA/$config_type.conf)
56-
if [ ! -z "$check_type" ]; then
55+
check_type1=$(grep -w "'$dom" $USER_DATA/$config_type.conf)
56+
check_type2=$(grep -w ",$dom" $USER_DATA/$config_type.conf)
57+
if [ ! -z "$check_type1" ] || [ ! -z "$check_type2" ]; then
5758
echo "Error: domain $dom exist"
5859
log_event "$E_EXISTS" "$EVENT"
5960
exit $E_EXISTS

0 commit comments

Comments
 (0)