diff --git a/letsencrypt-auto-source/letsencrypt-auto b/letsencrypt-auto-source/letsencrypt-auto index de8505409..8e7fff0a3 100755 --- a/letsencrypt-auto-source/letsencrypt-auto +++ b/letsencrypt-auto-source/letsencrypt-auto @@ -1085,6 +1085,10 @@ if [ "$1" = "--le-auto-phase2" ]; then # In this situation, we bypass any bootstrap or certbot venv setup. error "Your system is not supported by certbot-auto anymore." + if OldVenvExists; then + VENV_BIN="$OLD_VENV_PATH/bin" + fi + if [ -f "$VENV_BIN/letsencrypt" -a "$INSTALL_ONLY" != 1 ]; then error "Certbot will no longer receive updates." error "Please visit https://certbot.eff.org/ to check for other alternatives." diff --git a/letsencrypt-auto-source/letsencrypt-auto.template b/letsencrypt-auto-source/letsencrypt-auto.template index d080b69a5..bca1b9135 100755 --- a/letsencrypt-auto-source/letsencrypt-auto.template +++ b/letsencrypt-auto-source/letsencrypt-auto.template @@ -552,6 +552,10 @@ if [ "$1" = "--le-auto-phase2" ]; then # In this situation, we bypass any bootstrap or certbot venv setup. error "Your system is not supported by certbot-auto anymore." + if OldVenvExists; then + VENV_BIN="$OLD_VENV_PATH/bin" + fi + if [ -f "$VENV_BIN/letsencrypt" -a "$INSTALL_ONLY" != 1 ]; then error "Certbot will no longer receive updates." error "Please visit https://certbot.eff.org/ to check for other alternatives." diff --git a/letsencrypt-auto-source/tests/centos6_tests.sh b/letsencrypt-auto-source/tests/centos6_tests.sh index 69f2dc5a7..aa8b70a25 100644 --- a/letsencrypt-auto-source/tests/centos6_tests.sh +++ b/letsencrypt-auto-source/tests/centos6_tests.sh @@ -104,6 +104,18 @@ if ! "$LE_AUTO" --install-only 2>&1 | grep -q "Certbot cannot be installed."; th exit 1 fi +# Prepare certbot installation in the old venv path +# (copy installation in old path + forget about previous installation) +mkdir -p ~/.local/share +cp -ra "$VENV_PATH" ~/.local/share/letsencrypt +unset VENV_PATH +if ! "$LE_AUTO" 2>&1 | grep -q "Certbot will no longer receive updates."; then + echo "On CentOS 32 bits, certbot-auto upgraded certbot on the old venv path." + exit 1 +fi + +rm -rf ~/.local/share/letsencrypt + echo "PASSED: On CentOS6 32 bits, certbot-auto refuses to install/upgrade certbot." )