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

View file

@ -1621,7 +1621,10 @@ function _setup_user_patches
if [[ -f ${USER_PATCHES} ]] if [[ -f ${USER_PATCHES} ]]
then then
_notify 'tasklog' 'Applying user patches' _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} ${USER_PATCHES}
else else
_notify 'inf' "No optional '/tmp/docker-mailserver/user-patches.sh' provided. Skipping." _notify 'inf' "No optional '/tmp/docker-mailserver/user-patches.sh' provided. Skipping."