Commit 63a49376 authored by Lukas Schauer's avatar Lukas Schauer

Merge pull request #141 from fancycode/null_glob

Handle case where no files to cleanup exist.
parents 669185a0 ac2d8303
......@@ -701,6 +701,9 @@ command_cleanup() {
# Loop over all files of this type
for file in "${certdir}/${filebase}-"*".${fileext}"; do
# Handle case where no files match the wildcard
[[ -f "${file}" ]] || break
# Check if current file is in use, if unused move to archive directory
filename="$(basename "${file}")"
if [[ ! "${filename}" = "${current}" ]]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment