From 2a961d844202dcc2af714829f33b43c56b113356 Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Sun, 4 Aug 2024 13:12:31 +0200 Subject: [PATCH 1/2] chore: upgrade mailserver --- mail/docker-compose.yml | 2 +- mail/setup.sh | 21 +++++++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/mail/docker-compose.yml b/mail/docker-compose.yml index c9071a2..4e11303 100644 --- a/mail/docker-compose.yml +++ b/mail/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.9' services: mail: - image: mailserver/docker-mailserver:13.3.1 + image: mailserver/docker-mailserver:14.0.0 hostname: ${HOSTNAME} domainname: ${DOMAINNAME} container_name: ${CONTAINER_NAME} diff --git a/mail/setup.sh b/mail/setup.sh index b517d8b..6a89a43 100755 --- a/mail/setup.sh +++ b/mail/setup.sh @@ -27,8 +27,7 @@ RESET=$(echo -ne '\e[0m') set -euEo pipefail shopt -s inherit_errexit 2>/dev/null || true -function _show_local_usage -{ +function _show_local_usage() { # shellcheck disable=SC2059 printf '%s' "${ORANGE}OPTIONS${RESET} ${LBLUE}Config path, container or image adjustments${RESET} @@ -69,8 +68,7 @@ function _show_local_usage " } -function _get_absolute_script_directory -{ +function _get_absolute_script_directory() { if dirname "$(readlink -f "${0}")" &>/dev/null; then DIR=$(dirname "$(readlink -f "${0}")") elif realpath -e -L "${0}" &>/dev/null; then @@ -79,8 +77,7 @@ function _get_absolute_script_directory fi } -function _set_default_config_path -{ +function _set_default_config_path() { if [[ -d "${DIR}/config" ]]; then # legacy path (pre v10.2.0) DEFAULT_CONFIG_PATH="${DIR}/config" @@ -89,8 +86,7 @@ function _set_default_config_path fi } -function _handle_config_path -{ +function _handle_config_path() { if [[ -z ${DESIRED_CONFIG_PATH} ]]; then # no desired config path if [[ -n ${CONTAINER_NAME} ]]; then @@ -111,8 +107,7 @@ function _handle_config_path fi } -function _run_in_new_container -{ +function _run_in_new_container() { # start temporary container with specified image if ! ${CRI} history -q "${IMAGE_NAME}" &>/dev/null; then echo "Image '${IMAGE_NAME}' not found. Pulling ..." @@ -124,14 +119,12 @@ function _run_in_new_container "${IMAGE_NAME}" "${@}" } -function _main -{ +function _main() { _get_absolute_script_directory _set_default_config_path local OPTIND - while getopts ":c:i:p:zZR" OPT - do + while getopts ":c:i:p:zZR" OPT; do case ${OPT} in ( i ) IMAGE_NAME="${OPTARG}" ;; ( z | Z ) USE_SELINUX=":${OPT}" ;; -- 2.40.1 From 9f605affb8fa461af6171dd86e2b00635683dfd9 Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Sun, 4 Aug 2024 13:24:48 +0200 Subject: [PATCH 2/2] chore: docker compose clean up --- mail/docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/mail/docker-compose.yml b/mail/docker-compose.yml index 4e11303..c63f925 100644 --- a/mail/docker-compose.yml +++ b/mail/docker-compose.yml @@ -1,5 +1,3 @@ ---- -version: '3.9' services: mail: image: mailserver/docker-mailserver:14.0.0 -- 2.40.1