Skip to content

Commit

Permalink
Added return code for is_mail_new()
Browse files Browse the repository at this point in the history
  • Loading branch information
Ursadon committed Nov 7, 2013
1 parent 0607cdc commit 1c1e5fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions func/domain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 1c1e5fb

Please sign in to comment.