From 1d18cb81fb91ec0375c72e9395d1e41dab46f4f3 Mon Sep 17 00:00:00 2001 From: Georg Lauterbach Date: Mon, 28 Sep 2020 11:42:50 +0200 Subject: [PATCH] possible fix for tomav#1383 --- config/user-patches.sh.dist | 0 target/start-mailserver.sh | 15 ++++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) mode change 100644 => 100755 config/user-patches.sh.dist diff --git a/config/user-patches.sh.dist b/config/user-patches.sh.dist old mode 100644 new mode 100755 diff --git a/target/start-mailserver.sh b/target/start-mailserver.sh index 7985db88..a2f242dc 100644 --- a/target/start-mailserver.sh +++ b/target/start-mailserver.sh @@ -1757,13 +1757,18 @@ function _setup_logwatch() 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'" + _notify 'inf' 'Executing user-patches.sh' + chmod +x /tmp/docker-mailserver/user-patches.sh &>/dev/null || true + + if [[ -x /tmp/docker-mailserver/user-patches.sh ]] + then + /tmp/docker-mailserver/user-patches.sh + _notify 'inf' "Executed 'config/user-patches.sh'" + else + _notify 'err' "Could not execute user-patches.sh. Not executable!" + fi else _notify 'inf' "No user patches executed because optional '/tmp/docker-mailserver/user-patches.sh' is not provided." fi