From 795137f123f058489f364adfc43000576c4754cd Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Fri, 22 Nov 2019 23:44:42 +0100 Subject: [PATCH] Simplify code --- letsencrypt-auto-source/letsencrypt-auto | 11 ++++------- letsencrypt-auto-source/letsencrypt-auto.template | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/letsencrypt-auto-source/letsencrypt-auto b/letsencrypt-auto-source/letsencrypt-auto index 53627d04c..74d7e0a6f 100755 --- a/letsencrypt-auto-source/letsencrypt-auto +++ b/letsencrypt-auto-source/letsencrypt-auto @@ -1076,17 +1076,14 @@ UNLIKELY_EOF } if [ "$1" = "--le-auto-phase2" -a "$DEPRECATED_OS" = 1 ]; then - # Phase 2 damage control mode with deprecated OSes. + # Phase 2 damage control mode for deprecated OSes. # In this situation, we bypass any bootstrap or certbot venv setup. shift 1 - if [ ! -f "$VENV_BIN/letsencrypt" ]; then - error "Your system is not supported by certbot-auto anymore, and so certbot cannot be installed." - error "Please consult official Certbot site (https://certbot.eff.org/) to check other alternatives." - else - error "Your system is not supported by certbot-auto anymore, so certbot cannot be upgraded." - error "Please consult official Certbot site (https://certbot.eff.org/) to check other alternatives." + error "Your system is not supported by certbot-auto anymore, and so certbot cannot be installed or upgraded." + error "Please consult official Certbot site (https://certbot.eff.org/) to check other alternatives." + if [ -f "$VENV_BIN/letsencrypt" ]; then "$VENV_BIN/letsencrypt" "$@" fi diff --git a/letsencrypt-auto-source/letsencrypt-auto.template b/letsencrypt-auto-source/letsencrypt-auto.template index bd3d54385..64d230075 100755 --- a/letsencrypt-auto-source/letsencrypt-auto.template +++ b/letsencrypt-auto-source/letsencrypt-auto.template @@ -543,17 +543,14 @@ UNLIKELY_EOF } if [ "$1" = "--le-auto-phase2" -a "$DEPRECATED_OS" = 1 ]; then - # Phase 2 damage control mode with deprecated OSes. + # Phase 2 damage control mode for deprecated OSes. # In this situation, we bypass any bootstrap or certbot venv setup. shift 1 - if [ ! -f "$VENV_BIN/letsencrypt" ]; then - error "Your system is not supported by certbot-auto anymore, and so certbot cannot be installed." - error "Please consult official Certbot site (https://certbot.eff.org/) to check other alternatives." - else - error "Your system is not supported by certbot-auto anymore, so certbot cannot be upgraded." - error "Please consult official Certbot site (https://certbot.eff.org/) to check other alternatives." + error "Your system is not supported by certbot-auto anymore, and so certbot cannot be installed or upgraded." + error "Please consult official Certbot site (https://certbot.eff.org/) to check other alternatives." + if [ -f "$VENV_BIN/letsencrypt" ]; then "$VENV_BIN/letsencrypt" "$@" fi