]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
Allow for automatic deletion of old files
authorLukas Schauer <lukas@schauer.dev>
Fri, 2 May 2025 12:44:47 +0000 (14:44 +0200)
committerLukas Schauer <lukas@schauer.dev>
Fri, 2 May 2025 13:00:48 +0000 (15:00 +0200)
CHANGELOG
dehydrated
docs/examples/config

index 3a1839540e756ff8a640ff7d6d1b0b0bd44cbdd9..6e8104e293d3d42314e7e4d3f1b293148e6c73f3 100644 (file)
--- 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`)
index a93d443a03ff7fb3c3b48fb08d966714015cfc7d..dbf99754827ef94a769f05c2c3f560c3affbc1a1 100755 (executable)
@@ -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}"
index 0bc49ce62a09a1b2fe47fd60fb869e32fe833de1..c74ba2790cbcbd2656232fd52ac85cdf42a3da7d 100644 (file)
 # 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