From 1c1e5fb8e8f95ec1212c4c2c4b9c4c90e02b3048 Mon Sep 17 00:00:00 2001 From: Ursadon Date: Thu, 7 Nov 2013 16:57:51 +0700 Subject: [PATCH] Added return code for is_mail_new() --- func/domain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/func/domain.sh b/func/domain.sh index 1b797aa8..6143b431 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -143,14 +143,14 @@ is_mail_new() { if [ ! -z "$check_acc" ]; then echo "Error: mail account $1 exist" log_event "$E_EXISTS" "$EVENT" - exit + exit $E_EXISTS fi check_als=$(awk -F "ALIAS='" '{print $2}' $USER_DATA/mail/$domain.conf ) check_als=$(echo "$check_als" | cut -f 1 -d "'" | grep -w $1) if [ ! -z "$check_als" ]; then echo "Error: mail alias $1 exist" log_event "$E_EXISTS" "$EVENT" - exit + exit $E_EXISTS fi }