Explorar o código

Added return code for is_mail_new()

Ursadon %!s(int64=12) %!d(string=hai) anos
pai
achega
1c1e5fb8e8
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      func/domain.sh

+ 2 - 2
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
 }