diff --git a/CHANGELOG b/CHANGELOG index 3a18395..6e8104e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ This file contains a log of major changes in dehydrated ## Added - Implemented support for certificate profile selection - Added a configuration parameter to allow for timeouts during order processing (`ORDER_TIMEOUT`, defaults to 0 = no timeout) +- Allowed for automatic deletion of old files (`AUTO_CLEANUP_DELETE`, disabled by default) ## Changed - Renew certificates with 32 days remaining (instead of 30) to avoid issues with monthly cronjobs (`RENEW_DAYS=32`) diff --git a/dehydrated b/dehydrated index a93d443..dbf9975 100755 --- a/dehydrated +++ b/dehydrated @@ -395,6 +395,7 @@ load_config() { IP_VERSION= CHAINCACHE= AUTO_CLEANUP="no" + AUTO_CLEANUP_DELETE="no" DEHYDRATED_USER= DEHYDRATED_GROUP= API="auto" @@ -1966,8 +1967,8 @@ command_sign_domains() { [[ -n "${HOOK}" ]] && ("${HOOK}" "exit_hook" || echo 'exit_hook returned with non-zero exit code!' >&2) if [[ "${AUTO_CLEANUP}" == "yes" ]]; then - echo "+ Running automatic cleanup" - command_cleanup noinit + echo " + Running automatic cleanup" + PARAM_CLEANUPDELETE="${AUTO_CLEANUP_DELETE:-no}" command_cleanup noinit | _sed 's/^/ + /g' fi exit "${exit_with_errorcode}" diff --git a/docs/examples/config b/docs/examples/config index 0bc49ce..c74ba27 100644 --- a/docs/examples/config +++ b/docs/examples/config @@ -125,6 +125,9 @@ # Automatic cleanup (default: no) #AUTO_CLEANUP="no" +# Delete files during automatic cleanup instead of moving to archive (default: no) +#AUTO_CLEANUP_DELETE="no" + # ACME API version (default: auto) #API=auto