From c30c3bf5defe805f0604ae0dfe667003f4f5edbe Mon Sep 17 00:00:00 2001 From: Vortex Date: Wed, 16 Oct 2019 18:56:06 +0200 Subject: [PATCH] moved user_patches from misc to nearly the end of setups --- target/start-mailserver.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/target/start-mailserver.sh b/target/start-mailserver.sh index 87c87605..de8340d1 100644 --- a/target/start-mailserver.sh +++ b/target/start-mailserver.sh @@ -172,7 +172,8 @@ function register_functions() { if [ "$LOGWATCH_TRIGGER" != "none" ]; then _register_setup_function "_setup_logwatch" fi - + + _register_setup_function "_setup_user_patches" # Compute last as the config files are modified in-place _register_setup_function "_setup_chksum_file" @@ -195,7 +196,6 @@ function register_functions() { ################### >> misc funcs _register_misc_function "_misc_save_states" - _register_misc_function "_misc_user_patches" ################### << misc funcs @@ -1466,6 +1466,18 @@ function _setup_logwatch() { esac } +function _setup_user_patches() { + notify 'inf' 'Executing user-patches.sh' + + if [ -f /tmp/docker-mailserver/user-patches.sh ]; then + chmod +x /tmp/docker-mailserver/user-patches.sh + /tmp/docker-mailserver/user-patches.sh + notify 'inf' "Executed 'config/user-patches.sh'" + else + notify 'inf' "No user patches executed because optional '/tmp/docker-mailserver/user-patches.sh' is not provided." + fi +} + function _setup_environment() { notify 'task' 'Setting up /etc/environment' @@ -1596,18 +1608,6 @@ function _misc_save_states() { fi } -function _misc_user_patches() { - notify 'inf' 'Executing user-patches.sh' - - if [ -f /tmp/docker-mailserver/user-patches.sh ]; then - chmod +x /tmp/docker-mailserver/user-patches.sh - /tmp/docker-mailserver/user-patches.sh - notify 'inf' "Executed 'config/user-patches.sh'" - else - notify 'inf' "No user patches executed because optional '/tmp/docker-mailserver/user-patches.sh' is not provided." - fi -} - ########################################################################## # >> Start Daemons ##########################################################################