mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 01:55:29 +02:00
Change 'function' style (#3364)
This commit is contained in:
parent
cf74127f78
commit
37ca0f9ba9
60 changed files with 233 additions and 466 deletions
|
@ -3,8 +3,7 @@
|
|||
# shellcheck source=../scripts/helpers/index.sh
|
||||
source /usr/local/bin/helpers/index.sh
|
||||
|
||||
function _main
|
||||
{
|
||||
function _main() {
|
||||
_require_n_parameters_or_print_usage 1 "${@}"
|
||||
|
||||
# Tests expect early exit without error if no DB exists:
|
||||
|
@ -37,8 +36,7 @@ function _main
|
|||
done
|
||||
}
|
||||
|
||||
function __usage
|
||||
{
|
||||
function __usage() {
|
||||
printf '%s' "${PURPLE}delmailuser${RED}(${YELLOW}8${RED})
|
||||
|
||||
${ORANGE}USAGE${RESET}
|
||||
|
@ -71,8 +69,7 @@ ${ORANGE}EXIT STATUS${RESET}
|
|||
"
|
||||
}
|
||||
|
||||
function _parse_options
|
||||
{
|
||||
function _parse_options() {
|
||||
while getopts ":yY" OPT
|
||||
do
|
||||
case "${OPT}" in
|
||||
|
@ -89,8 +86,7 @@ function _parse_options
|
|||
done
|
||||
}
|
||||
|
||||
function _maildel_request_if_missing
|
||||
{
|
||||
function _maildel_request_if_missing() {
|
||||
if [[ ${MAILDEL} -eq 0 ]]; then
|
||||
local MAILDEL_CHOSEN
|
||||
read -r -p "Do you want to delete the mailbox as well (removing all mails)? [Y/n] " MAILDEL_CHOSEN
|
||||
|
@ -102,8 +98,7 @@ function _maildel_request_if_missing
|
|||
fi
|
||||
}
|
||||
|
||||
function _remove_maildir
|
||||
{
|
||||
function _remove_maildir() {
|
||||
local MAIL_ACCOUNT=${1}
|
||||
|
||||
local LOCAL_PART="${MAIL_ACCOUNT%@*}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue