From 41cbf0ba8e299d47457bcd992b163ca00061ef1a Mon Sep 17 00:00:00 2001 From: Tomasz Stanczak Date: Sat, 15 Feb 2025 20:31:58 +0100 Subject: [PATCH] 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. --- tools/ssl_cleanup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ssl_cleanup b/tools/ssl_cleanup index 5adfa1be..fd246eba 100755 --- a/tools/ssl_cleanup +++ b/tools/ssl_cleanup @@ -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 source /etc/mailinabox.conf -shopt -s extglob +shopt -s extglob nullglob retain_after="$(date --date="7 days ago" +%Y%m%d)"