mirror of
https://github.com/certbot/certbot.git
synced 2026-07-31 18:34:41 +02:00
Handle need to rebootstrap before fetch.py (#5389)
* Fix #5387 * Add test for #5387 * remove LE_PYTHON * Use environment variable to reduce line length
This commit is contained in:
@@ -4,6 +4,8 @@ yum update -y > /dev/null
|
||||
yum install -y centos-release-scl > /dev/null
|
||||
yum install -y python27 > /dev/null 2> /dev/null
|
||||
|
||||
LE_AUTO="certbot/letsencrypt-auto-source/letsencrypt-auto"
|
||||
|
||||
# we're going to modify env variables, so do this in a subshell
|
||||
(
|
||||
source /opt/rh/python27/enable
|
||||
@@ -25,7 +27,7 @@ if [ $RESULT -ne 0 ]; then
|
||||
fi
|
||||
|
||||
# bootstrap, but don't install python 3.
|
||||
certbot/letsencrypt-auto-source/letsencrypt-auto --no-self-upgrade -n > /dev/null 2> /dev/null
|
||||
"$LE_AUTO" --no-self-upgrade -n > /dev/null 2> /dev/null
|
||||
|
||||
# ensure python 3 isn't installed
|
||||
python3 --version 2> /dev/null
|
||||
@@ -47,8 +49,14 @@ if [ $RESULT -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Skip self upgrade due to Python 3 not being available.
|
||||
if ! "$LE_AUTO" 2>&1 | grep -q "WARNING: couldn't find Python"; then
|
||||
echo "Python upgrade failure warning not printed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# bootstrap, this time installing python3
|
||||
certbot/letsencrypt-auto-source/letsencrypt-auto --no-self-upgrade -n > /dev/null 2> /dev/null
|
||||
"$LE_AUTO" --no-self-upgrade -n > /dev/null 2> /dev/null
|
||||
|
||||
# ensure python 3 is installed
|
||||
python3 --version > /dev/null
|
||||
|
||||
Reference in New Issue
Block a user