Update template

This commit is contained in:
Adrien Ferrand 2019-12-04 21:06:53 +01:00
parent d87f70e45c
commit 29161176ef
2 changed files with 41 additions and 29 deletions

View file

@ -758,7 +758,7 @@ elif [ -f /etc/redhat-release ]; then
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
if [ "$PYVER" -eq 26 -a "$RPM_DIST_NAME" != "rhel" -a $(arch) != 'x86_64' ]; then
if [ "$PYVER" -eq 26 -a "$RPM_DIST_NAME" != "rhel" -a $(uname -m) != 'x86_64' ]; then
# 32 bits CentOS 6 and affiliates (except RHEL) are not supported anymore by certbot-auto.
DEPRECATED_OS=1
fi
@ -877,7 +877,7 @@ fi
if [ "$DEPRECATED_OS" = 1 ]; then
Bootstrap() {
error "Skipping bootstrap on deprecated systems."
error "Skipping bootstrap because certbot-auto is deprecated on this system."
}
unset BOOTSTRAP_VERSION
fi
@ -1075,22 +1075,28 @@ if __name__ == '__main__':
UNLIKELY_EOF
}
if [ "$1" = "--le-auto-phase2" -a "$DEPRECATED_OS" = 1 ]; then
# Phase 2 damage control mode for deprecated OSes.
# In this situation, we bypass any bootstrap or certbot venv setup.
shift 1
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
elif [ "$1" = "--le-auto-phase2" ]; then
if [ "$1" = "--le-auto-phase2" ]; then
# Phase 2: Create venv, install LE, and run.
shift 1 # the --le-auto-phase2 arg
if [ "$DEPRECATED_OS" = 1 ]; then
# Phase 2 damage control mode for deprecated OSes.
# In this situation, we bypass any bootstrap or certbot venv setup.
error "Your system is not supported by certbot-auto anymore."
if [ -f "$VENV_BIN/letsencrypt" ]; then
error "Certbot will no longer receive updates."
error "Please visit https://certbot.eff.org/ to check for other alternatives."
"$VENV_BIN/letsencrypt" "$@"
exit 0
else
error "Certbot cannot be installed."
error "Please visit https://certbot.eff.org/ to check for other alternatives."
exit 1
fi
fi
SetPrevBootstrapVersion
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then

View file

@ -333,7 +333,7 @@ elif [ -f /etc/redhat-release ]; then
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
if [ "$PYVER" -eq 26 -a "$RPM_DIST_NAME" != "rhel" -a $(arch) != 'x86_64' ]; then
if [ "$PYVER" -eq 26 -a "$RPM_DIST_NAME" != "rhel" -a $(uname -m) != 'x86_64' ]; then
# 32 bits CentOS 6 and affiliates (except RHEL) are not supported anymore by certbot-auto.
DEPRECATED_OS=1
fi
@ -542,22 +542,28 @@ CheckPathPermissions() {
UNLIKELY_EOF
}
if [ "$1" = "--le-auto-phase2" -a "$DEPRECATED_OS" = 1 ]; then
# Phase 2 damage control mode for deprecated OSes.
# In this situation, we bypass any bootstrap or certbot venv setup.
shift 1
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
elif [ "$1" = "--le-auto-phase2" ]; then
if [ "$1" = "--le-auto-phase2" ]; then
# Phase 2: Create venv, install LE, and run.
shift 1 # the --le-auto-phase2 arg
if [ "$DEPRECATED_OS" = 1 ]; then
# Phase 2 damage control mode for deprecated OSes.
# In this situation, we bypass any bootstrap or certbot venv setup.
error "Your system is not supported by certbot-auto anymore."
if [ -f "$VENV_BIN/letsencrypt" ]; then
error "Certbot will no longer receive updates."
error "Please visit https://certbot.eff.org/ to check for other alternatives."
"$VENV_BIN/letsencrypt" "$@"
exit 0
else
error "Certbot cannot be installed."
error "Please visit https://certbot.eff.org/ to check for other alternatives."
exit 1
fi
fi
SetPrevBootstrapVersion
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then