mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-12 10:24:55 +02:00
Change 'function' style (#3364)
This commit is contained in:
parent
cf74127f78
commit
37ca0f9ba9
60 changed files with 233 additions and 466 deletions
|
@ -2,14 +2,12 @@
|
|||
|
||||
declare -a FUNCS_SETUP
|
||||
|
||||
function _register_setup_function
|
||||
{
|
||||
function _register_setup_function() {
|
||||
FUNCS_SETUP+=("${1}")
|
||||
_log 'trace' "${1}() registered"
|
||||
}
|
||||
|
||||
function _setup
|
||||
{
|
||||
function _setup() {
|
||||
# Requires `shopt -s globstar` because of `**` which in
|
||||
# turn is required as we're decending through directories
|
||||
for FILE in /usr/local/bin/setup.d/**/*.sh
|
||||
|
@ -28,8 +26,7 @@ function _setup
|
|||
_prepare_for_change_detection
|
||||
}
|
||||
|
||||
function _early_supervisor_setup
|
||||
{
|
||||
function _early_supervisor_setup() {
|
||||
SUPERVISOR_LOGLEVEL="${SUPERVISOR_LOGLEVEL:-warn}"
|
||||
|
||||
if ! grep -q "loglevel = ${SUPERVISOR_LOGLEVEL}" /etc/supervisor/supervisord.conf; then
|
||||
|
@ -56,8 +53,7 @@ function _early_supervisor_setup
|
|||
return 0
|
||||
}
|
||||
|
||||
function _setup_timezone
|
||||
{
|
||||
function _setup_timezone() {
|
||||
[[ -n ${TZ} ]] || return 0
|
||||
_log 'debug' "Setting timezone to '${TZ}'"
|
||||
|
||||
|
@ -78,8 +74,7 @@ function _setup_timezone
|
|||
fi
|
||||
}
|
||||
|
||||
function _setup_apply_fixes_after_configuration
|
||||
{
|
||||
function _setup_apply_fixes_after_configuration() {
|
||||
_log 'trace' 'Removing leftover PID files from a stop/start'
|
||||
find /var/run/ -not -name 'supervisord.pid' -name '*.pid' -delete
|
||||
touch /dev/shm/supervisor.sock
|
||||
|
@ -93,8 +88,7 @@ function _setup_apply_fixes_after_configuration
|
|||
rm -rf /var/mail-state/spool-postfix/{dev,etc,lib,pid,usr,private/auth}
|
||||
}
|
||||
|
||||
function _run_user_patches
|
||||
{
|
||||
function _run_user_patches() {
|
||||
local USER_PATCHES='/tmp/docker-mailserver/user-patches.sh'
|
||||
|
||||
if [[ -f ${USER_PATCHES} ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue