mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-18 08:39:10 +02:00
chore: simplify startup conditional block
Signed-off-by: georglauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
parent
22022481e2
commit
f0735fcfb1
1 changed files with 11 additions and 16 deletions
|
@ -176,25 +176,20 @@ function _register_functions() {
|
|||
# ? >> Executing all stacks / actual start of DMS
|
||||
# ------------------------------------------------------------
|
||||
|
||||
_early_supervisor_setup
|
||||
_early_variables_setup
|
||||
|
||||
_log 'info' "Welcome to docker-mailserver ${DMS_RELEASE}"
|
||||
|
||||
_register_functions
|
||||
_check
|
||||
|
||||
# Ensure DMS only adjusts config files for a new container.
|
||||
# Container restarts should skip as they retain the modified config.
|
||||
if [[ ! -f /CONTAINER_START ]]; then
|
||||
_early_supervisor_setup
|
||||
_early_variables_setup
|
||||
|
||||
_log 'info' "Welcome to docker-mailserver ${DMS_RELEASE}"
|
||||
|
||||
_register_functions
|
||||
_check
|
||||
_setup
|
||||
else
|
||||
# container was restarted
|
||||
_early_variables_setup
|
||||
|
||||
if [[ -f /CONTAINER_START ]]; then
|
||||
_log 'info' 'Container was restarted. Skipping setup routines.'
|
||||
_log 'info' "Welcome to docker-mailserver ${DMS_RELEASE}"
|
||||
|
||||
_register_functions
|
||||
else
|
||||
_setup
|
||||
fi
|
||||
|
||||
# marker to check if container was restarted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue