chore: remove redundant checks

Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
Georg Lauterbach 2025-02-16 23:13:46 +01:00
parent 6668cbf0fb
commit 8b01330151
No known key found for this signature in database
GPG Key ID: D84CD4AA46D7F099
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ DMS_STATE_DIR='/var/mail-state'
# Consolidate all states into a single directory
# (/var/mail-state) to allow persistence using docker volumes
function _setup_save_states() {
if [[ ! -d ${DMS_STATE_DIR:?DMS_STATE_DIR is not set} ]]; then
if [[ ! -d ${DMS_STATE_DIR} ]]; then
_log 'debug' "'${DMS_STATE_DIR}' is not present - not consolidating state"
return 0
fi
@ -93,7 +93,7 @@ function _setup_save_states() {
# These corrections are to fix changes to UID/GID values between upgrades,
# or when ownership/permissions were altered externally on the host (eg: migration or system scripts)
function _setup_adjust_state_permissions() {
[[ ! -d ${DMS_STATE_DIR:?DMS_STATE_DIR is not set} ]] && return 0
[[ ! -d ${DMS_STATE_DIR} ]] && return 0
# This ensures the user and group of the files from the external mount have their
# numeric ID values in sync. New releases where the installed packages order changes