Fix #2122 - only chmod when needed (#2127)

This commit is contained in:
William Desportes 2021-08-13 00:09:44 +02:00 committed by GitHub
parent 776bfe9f7f
commit 392ee076ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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."