From ae9da60d42ca8531469c33ed21f98b7d28d17f46 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 17 Aug 2012 15:46:52 +0300 Subject: [PATCH] fixed new alias validation --- func/domain.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/func/domain.sh b/func/domain.sh index 0eb17f5c..492fb8fd 100755 --- a/func/domain.sh +++ b/func/domain.sh @@ -52,8 +52,9 @@ is_domain_new() { if [ ! -z "$check_all" ]; then check_ownership=$(grep -w $dom $USER_DATA/*.conf) if [ ! -z "$check_ownership" ]; then - check_type=$(grep -w $dom $USER_DATA/$config_type.conf) - if [ ! -z "$check_type" ]; then + check_type1=$(grep -w "'$dom" $USER_DATA/$config_type.conf) + check_type2=$(grep -w ",$dom" $USER_DATA/$config_type.conf) + if [ ! -z "$check_type1" ] || [ ! -z "$check_type2" ]; then echo "Error: domain $dom exist" log_event "$E_EXISTS" "$EVENT" exit $E_EXISTS