mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-06-30 04:24:49 +02:00
scripts: Improve error handling, when parameters are missing (#2854)
This commit is contained in:
parent
caf2338201
commit
897d84f0f9
16 changed files with 26 additions and 20 deletions
|
@ -34,3 +34,13 @@ function _chown_var_mail_if_necessary
|
|||
chown -R 5000:5000 /var/mail || return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function _require_n_parameters_or_print_usage
|
||||
{
|
||||
local COUNT
|
||||
COUNT=${1}
|
||||
shift
|
||||
|
||||
[[ ${1:-} == 'help' ]] && { __usage ; exit 0 ; }
|
||||
[[ ${#} -lt ${COUNT} ]] && { __usage ; exit 1 ; }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue