diff --git a/tools/ssl_cleanup b/tools/ssl_cleanup index 5adfa1be..eb3eba7b 100755 --- a/tools/ssl_cleanup +++ b/tools/ssl_cleanup @@ -7,7 +7,8 @@ shopt -s extglob retain_after="$(date --date="7 days ago" +%Y%m%d)" mkdir -p $STORAGE_ROOT/ssl.expired -for file in $STORAGE_ROOT/ssl/*-+([0-9])-+([0-9a-f]).pem; do +ls $STORAGE_ROOT/ssl/*-+([0-9])-+([0-9a-f]).pem 2>/dev/null | while read file +do pem="$(basename "$file")" not_valid_after="$(cut -d- -f1 <<< "${pem: -21}")"