cleanup: also remove dangling symlinks

This commit is contained in:
Lukas Schauer
2020-12-10 14:15:07 +01:00
parent 129ec851ed
commit f2d6a6152e

View File

@@ -1884,6 +1884,10 @@ command_cleanup() {
# Look up current file in use
current="$(basename "$(readlink "${certdir}/${filetype}")")"
else
if [[ -h "${certdir}/${filetype}" ]]; then
echo "Removing broken symlink: ${certdir}/${filetype}"
rm -f "${certdir}/${filetype}"
fi
current=""
fi