setup-stack: fix error when RSPAMD_DMS_DKIM_D is not set (#3827)

* setup-stack: fix error when RSPAMD_DMS_DKIM_D is not set

prevent messages like this
  chown: cannot access '': No such file or directory
when RSPAMD_DMS_DKIM_D has no value

* Update target/scripts/startup/setup-stack.sh

---------

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
Andreas Perhab 2024-01-26 14:40:29 +01:00 committed by GitHub
parent ba27edc801
commit 9ac11021e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -95,8 +95,9 @@ function _setup_apply_fixes_after_configuration() {
_log 'debug' 'Removing files and directories from older versions'
rm -rf /var/mail-state/spool-postfix/{dev,etc,lib,pid,usr,private/auth}
_rspamd_get_envs
# /tmp/docker-mailserver/rspamd/dkim
_log 'debug' "Ensuring ${RSPAMD_DMS_DKIM_D} is owned by '_rspamd:_rspamd'"
_log 'debug' "Ensuring '${RSPAMD_DMS_DKIM_D}' is owned by '_rspamd:_rspamd'"
chown -R _rspamd:_rspamd "${RSPAMD_DMS_DKIM_D}"
}