Handle old venv path

This commit is contained in:
Adrien Ferrand 2019-12-20 21:03:58 +01:00
parent e1c53525b0
commit a7560fed85
3 changed files with 20 additions and 0 deletions

View file

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

View file

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

View file

@ -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."
)