From cdc6dfba6a214249055fc4bd8b41b0a074783f25 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Tue, 18 Feb 2020 21:38:32 +0100 Subject: [PATCH] remove every trace, not just the live version (#1088) --- apps/onlyoffice.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/onlyoffice.sh b/apps/onlyoffice.sh index 737ace92..0cd36094 100644 --- a/apps/onlyoffice.sh +++ b/apps/onlyoffice.sh @@ -53,7 +53,10 @@ then if [ -f "$CERTFILES/$SUBDOMAIN/cert.pem" ] then yes no | certbot revoke --cert-path "$CERTFILES/$SUBDOMAIN/cert.pem" - rm -rf "${CERTFILES:?/}"/"${SUBDOMAIN:?}"* + REMOVE_OLD="$(find "$LETSENCRYPTPATH/" -name "$SUBDOMAIN*")" + for remove in $REMOVE_OLD + do rm -rf "$remove" + done fi # Remove Apache2 config if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ] @@ -125,7 +128,10 @@ then if [ -f "$CERTFILES/$SUBDOMAIN/cert.pem" ] then yes no | certbot revoke --cert-path "$CERTFILES/$SUBDOMAIN/cert.pem" - rm -rf "${CERTFILES:?/}"/"${SUBDOMAIN:?}"* + REMOVE_OLD="$(find "$LETSENCRYPTPATH/" -name "$SUBDOMAIN*")" + for remove in $REMOVE_OLD + do rm -rf "$remove" + done fi # Remove Apache2 config if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]