Rspamd scripts: only correct permissions when directory exists (#3849)

This commit is contained in:
Georg Lauterbach 2024-01-29 22:10:03 +01:00 committed by GitHub
parent 2018be7fdc
commit 4162d608e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -97,8 +97,10 @@ function _setup_apply_fixes_after_configuration() {
_rspamd_get_envs
# /tmp/docker-mailserver/rspamd/dkim
_log 'debug' "Ensuring '${RSPAMD_DMS_DKIM_D}' is owned by '_rspamd:_rspamd'"
chown -R _rspamd:_rspamd "${RSPAMD_DMS_DKIM_D}"
if [[ -d ${RSPAMD_DMS_DKIM_D} ]]; then
_log 'debug' "Ensuring '${RSPAMD_DMS_DKIM_D}' is owned by '_rspamd:_rspamd'"
chown -R _rspamd:_rspamd "${RSPAMD_DMS_DKIM_D}"
fi
}
function _run_user_patches() {