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