add error exit codes

This commit is contained in:
Matthew Saunders Brown 2022-05-10 09:53:40 -07:00
parent 18e103e50d
commit 5613604eb7

View File

@ -26,7 +26,7 @@ else
# check that MYSQL_CONNECTION_INFO_FILE exists and is readable
if [ ! -f "$MYSQL_CONNECTION_INFO_FILE" ]; then
echo "ERROR: MySQL connection info file ($MYSQL_CONNECTION_INFO_FILE) does not exist or is not readable."
exit
exit 1
fi
fi
fi
@ -99,7 +99,7 @@ function vmail:getoptions () {
alias=${alias%@*}
else
echo "ERROR: $domain is not a valid domain name."
exit
exit 1
fi
fi
;;
@ -113,7 +113,7 @@ function vmail:getoptions () {
domain=${OPTARG,,}
if ! vmail::validate_domain $domain; then
echo "ERROR: $domain is not a valid domain name."
exit
exit 1
fi
;;
e ) # email address