OCSP_MUST_STAPLE="no"
IP_VERSION=
CHAINCACHE=
+ AUTO_CLEANUP="no"
if [[ -z "${CONFIG:-}" ]]; then
echo "#" >&2
# remove temporary domains.txt file if used
[[ -n "${PARAM_DOMAIN:-}" ]] && rm -f "${DOMAINS_TXT}"
+ if [[ "${AUTO_CLEANUP}" == "yes" ]]; then
+ echo "+ Running automatic cleanup"
+ command_cleanup noinit
+ fi
[[ -n "${HOOK}" ]] && "${HOOK}" "exit_hook"
exit 0
}
# Usage: --cleanup (-gc)
# Description: Move unused certificate files to archive directory
command_cleanup() {
- load_config
+ if [ ! "${1:-}" = "noinit" ]; then
+ load_config
+ fi
# Create global archive directory if not existent
if [[ ! -e "${BASEDIR}/archive" ]]; then