From 392ee076ec0843d852355777e3388f8a78df3710 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Fri, 13 Aug 2021 00:09:44 +0200 Subject: [PATCH] Fix #2122 - only chmod when needed (#2127) --- target/scripts/startup/setup-stack.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/scripts/startup/setup-stack.sh b/target/scripts/startup/setup-stack.sh index 1077dea5..27ed552e 100644 --- a/target/scripts/startup/setup-stack.sh +++ b/target/scripts/startup/setup-stack.sh @@ -1621,7 +1621,10 @@ function _setup_user_patches if [[ -f ${USER_PATCHES} ]] then _notify 'tasklog' 'Applying user patches' - chmod +x "${USER_PATCHES}" + if [[ ! -x ${USER_PATCHES} ]]; then + _notify 'inf' 'Making user patches script executable' + chmod +x "${USER_PATCHES}" + fi ${USER_PATCHES} else _notify 'inf' "No optional '/tmp/docker-mailserver/user-patches.sh' provided. Skipping."