1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-02-22 17:37:04 +00:00

Handle no existence of expired certificates before trying to move them into ssl.expired subdirectory (#2480)

Shell option 'nullglob' to prevent the following 'for' loop from being entered even when no matching files are present.
This commit is contained in:
Tomasz Stanczak 2025-02-15 20:31:58 +01:00 committed by GitHub
parent 5ef85f3d02
commit 41cbf0ba8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,7 @@
# Cleanup SSL certificates which expired more than 7 days ago from $STORAGE_ROOT/ssl and move them to $STORAGE_ROOT/ssl.expired # Cleanup SSL certificates which expired more than 7 days ago from $STORAGE_ROOT/ssl and move them to $STORAGE_ROOT/ssl.expired
source /etc/mailinabox.conf source /etc/mailinabox.conf
shopt -s extglob shopt -s extglob nullglob
retain_after="$(date --date="7 days ago" +%Y%m%d)" retain_after="$(date --date="7 days ago" +%Y%m%d)"