letsencrypt-auto for debian squeeze (fixes #1078).

This commit is contained in:
Jakub Warmuz 2015-10-31 12:39:24 +00:00
parent 6d8e48c4ff
commit f414f51d82
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA
2 changed files with 10 additions and 3 deletions

View file

@ -13,7 +13,7 @@ VENV_PATH=${VENV_PATH:-"$XDG_DATA_HOME/$VENV_NAME"}
# later steps, causing "ImportError: cannot import name unpack_url"
if [ ! -d $VENV_PATH ]
then
virtualenv --no-site-packages --python python2 $VENV_PATH
virtualenv --no-site-packages --python ${LE_PYTHON:-python2} $VENV_PATH
fi
. $VENV_PATH/bin/activate

View file

@ -26,6 +26,13 @@ for arg in "$@" ; do
fi
done
if [ -f /etc/debian_version ] ; then
# squeeze needs Python 2.6, `python2` doesn't exist
if grep -q '^6\.0' /etc/debian_version ; then
LE_PYTHON=${LE_PYTHON:-python}
fi
fi
# virtualenv call is not idempotent: it overwrites pip upgraded in
# later steps, causing "ImportError: cannot import name unpack_url"
if [ ! -d $VENV_PATH ]
@ -67,9 +74,9 @@ then
echo "Creating virtual environment..."
if [ "$VERBOSE" = 1 ] ; then
virtualenv --no-site-packages --python python2 $VENV_PATH
virtualenv --no-site-packages --python ${LE_PYTHON:-python2} $VENV_PATH
else
virtualenv --no-site-packages --python python2 $VENV_PATH > /dev/null
virtualenv --no-site-packages --python ${LE_PYTHON:-python2} $VENV_PATH > /dev/null
fi
fi