Permalink
Browse files

Added return code for is_mail_new()

  • Loading branch information...
Ursadon committed Nov 7, 2013
1 parent 0607cdc commit 1c1e5fb8e8f95ec1212c4c2c4b9c4c90e02b3048
Showing with 2 additions and 2 deletions.
  1. +2 −2 func/domain.sh
View
@@ -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
}

0 comments on commit 1c1e5fb

Please sign in to comment.