From 4899670c70c4a18285e01d2ceda03e4c92b0d285 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Tue, 7 Mar 2023 19:02:03 -0600 Subject: [PATCH] Cleanup unused csr and keys folders --- README.md | 1 + readme-vars.yml | 1 + root/etc/s6-overlay/s6-rc.d/init-certbot-config/run | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/README.md b/README.md index e691258..7108e36 100644 --- a/README.md +++ b/README.md @@ -336,6 +336,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **07.03.23:** - Cleanup unused csr and keys folders. See [certbot 2.3.0 release notes](https://github.com/certbot/certbot/releases/tag/v2.3.0). * **02.03.23:** - Set permissions on crontabs during init. * **09.02.23:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) proxy.conf, authelia-location.conf and authelia-server.conf - Add Authentik configs, update Authelia configs. * **06.02.23:** - Add porkbun support back in. diff --git a/readme-vars.yml b/readme-vars.yml index 9aa2f82..0affb5d 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -154,6 +154,7 @@ app_setup_block: | # changelog changelogs: + - { date: "07.03.23:", desc: "Cleanup unused csr and keys folders. See [certbot 2.3.0 release notes](https://github.com/certbot/certbot/releases/tag/v2.3.0)." } - { date: "02.03.23:", desc: "Set permissions on crontabs during init." } - { date: "09.02.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) proxy.conf, authelia-location.conf and authelia-server.conf - Add Authentik configs, update Authelia configs." } - { date: "06.02.23:", desc: "Add porkbun support back in." } diff --git a/root/etc/s6-overlay/s6-rc.d/init-certbot-config/run b/root/etc/s6-overlay/s6-rc.d/init-certbot-config/run index 3ad4284..db10a1e 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-certbot-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-certbot-config/run @@ -140,6 +140,10 @@ else ln -s ../etc/letsencrypt/live/"${URL}" /config/keys/letsencrypt fi +# cleanup unused csr and keys folders +rm -rf /etc/letsencrypt/csr +rm -rf /etc/letsencrypt/keys + # checking for changes in cert variables, revoking certs if necessary if [[ ! "${URL}" = "${ORIGURL}" ]] || [[ ! "${SUBDOMAINS}" = "${ORIGSUBDOMAINS}" ]] ||