From cd19f7fa91eb16bfc2d38911bb5140b929ce1647 Mon Sep 17 00:00:00 2001 From: gitclonebrian <235774926+gitclonebrian@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:49:56 -0500 Subject: [PATCH] removed extra comments. certbot image cleanup now always happens when uninstalling, regardless of BW image cleanup --- run.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/run.sh b/run.sh index bc1ddb6..7f41e87 100755 --- a/run.sh +++ b/run.sh @@ -91,7 +91,6 @@ function install() { certonly --standalone --noninteractive --agree-tos --preferred-challenges http \ --email $EMAIL -d $DOMAIN --logs-dir /etc/letsencrypt/logs - # check if the certbot image should be removed from the system certbotCleanup fi fi @@ -178,7 +177,6 @@ function updateLetsEncrypt() { -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \ renew --logs-dir /etc/letsencrypt/logs - # check if the certbot image should be removed from the system certbotCleanup fi } @@ -191,7 +189,6 @@ function forceUpdateLetsEncrypt() { -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \ renew --logs-dir /etc/letsencrypt/logs --force-renew - # check if the certbot image should be removed from the system certbotCleanup fi } @@ -288,10 +285,10 @@ function uninstall() { if [ "$PURGE_ACTION" == "y" ] then dockerPrune - certbotCleanup - echo -e -n "${CYAN}Bitwarden uninstall complete! ${NC}" fi + + certbotCleanup } function printEnvironment() { @@ -322,15 +319,13 @@ function pullSetup() { } function certbotCleanup() { - # check if the certbot image is being used by any containers + # Check if the certbot image is being used by any containers if [[ -z $(docker ps -a --filter ancestor=certbot/certbot --quiet) ]] then - # prompt the user echo -e -n "${RED}(!) The [certbot/certbot] container image used by this script is no longer associated with any containers. Would you like to purge it? (y/N): ${NC}" read RESPONSE RESPONSE=$(echo "$RESPONSE" | tr '[:upper:]' '[:lower:]') - # remove the image if that's what the user chooses if [[ $RESPONSE == 'y' ]] then docker image rm certbot/certbot