Simplify code

This commit is contained in:
Adrien Ferrand 2019-11-22 23:44:42 +01:00
parent 39989c2721
commit 795137f123
2 changed files with 8 additions and 14 deletions

View file

@ -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

View file

@ -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