mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-09 17:04:53 +02:00
scripts: improve shutdown function by making PANIC_STRATEGY obsolete (#3265)
This commit is contained in:
parent
a735dddc52
commit
ea07bcdb4c
9 changed files with 19 additions and 28 deletions
|
@ -38,7 +38,7 @@ function _check_hostname
|
|||
# HOSTNAME should be an FQDN (eg: hostname.domain)
|
||||
if ! grep -q -E '^(\S+[.]\S+)$' <<< "${HOSTNAME}"
|
||||
then
|
||||
_dms_panic__general 'Setting hostname/domainname is required' '' 'immediate'
|
||||
_dms_panic__general 'Setting hostname/domainname is required'
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ function _default_start_daemon
|
|||
if [[ ${?} -ne 0 ]]
|
||||
then
|
||||
_log 'error' "${RESULT}"
|
||||
_dms_panic__fail_init "${1}" '' 'immediate'
|
||||
_dms_panic__fail_init "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ function _setup_apply_fixes_after_configuration
|
|||
_log 'debug' 'Checking /var/mail permissions'
|
||||
if ! _chown_var_mail_if_necessary
|
||||
then
|
||||
_dms_panic__general 'Failed to fix /var/mail permissions' '' 'immediate'
|
||||
_dms_panic__general 'Failed to fix /var/mail permissions'
|
||||
fi
|
||||
|
||||
_log 'debug' 'Removing files and directories from older versions'
|
||||
|
|
|
@ -175,7 +175,7 @@ function _setup_dovecot_local_user
|
|||
fi
|
||||
done
|
||||
|
||||
_dms_panic__fail_init 'accounts provisioning because no accounts were provided - Dovecot could not be started' '' 'immediate'
|
||||
_dms_panic__fail_init 'accounts provisioning because no accounts were provided - Dovecot could not be started'
|
||||
}
|
||||
|
||||
__wait_until_an_account_is_added_or_shutdown
|
||||
|
@ -199,7 +199,7 @@ function _setup_dovecot_inet_protocols
|
|||
PROTOCOL='[::]' # IPv6 only
|
||||
else
|
||||
# Unknown value, panic.
|
||||
_dms_panic__invalid_value 'DOVECOT_INET_PROTOCOLS' "${DOVECOT_INET_PROTOCOLS}" 'immediate'
|
||||
_dms_panic__invalid_value 'DOVECOT_INET_PROTOCOLS' "${DOVECOT_INET_PROTOCOLS}"
|
||||
fi
|
||||
|
||||
sedfile -i "s|^#listen =.*|listen = ${PROTOCOL}|g" /etc/dovecot/dovecot.conf
|
||||
|
|
|
@ -22,7 +22,7 @@ function _setup_docker_permit
|
|||
if [[ -z ${CONTAINER_IP} ]]
|
||||
then
|
||||
_log 'error' 'Detecting the container IP address failed'
|
||||
_dms_panic__misconfigured 'NETWORK_INTERFACE' 'Network Setup [docker_permit]' 'immediate'
|
||||
_dms_panic__misconfigured 'NETWORK_INTERFACE' 'Network Setup [docker_permit]'
|
||||
fi
|
||||
|
||||
while read -r IP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue