Skip to content

Commit 95c265e

Browse files
committed
Merge pull request hestiacp#84 from Ursadon/master
Added return code for is_mail_new()
2 parents 787f33d + 1c1e5fb commit 95c265e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

func/domain.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ is_mail_new() {
143143
if [ ! -z "$check_acc" ]; then
144144
echo "Error: mail account $1 exist"
145145
log_event "$E_EXISTS" "$EVENT"
146-
exit
146+
exit $E_EXISTS
147147
fi
148148
check_als=$(awk -F "ALIAS='" '{print $2}' $USER_DATA/mail/$domain.conf )
149149
check_als=$(echo "$check_als" | cut -f 1 -d "'" | grep -w $1)
150150
if [ ! -z "$check_als" ]; then
151151
echo "Error: mail alias $1 exist"
152152
log_event "$E_EXISTS" "$EVENT"
153-
exit
153+
exit $E_EXISTS
154154
fi
155155
}
156156

0 commit comments

Comments
 (0)