mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 00:32:12 -04:00
Basic virtualenv bootstrap script for end users.
This commit is contained in:
parent
63d76ed21e
commit
3f942d7426
2 changed files with 38 additions and 9 deletions
35
bootstrap/venv.sh
Executable file
35
bootstrap/venv.sh
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# Installs and updates letencrypt virtualenv
|
||||
#
|
||||
# USAGE: source ./dev/venv.sh
|
||||
|
||||
|
||||
XDG_DATA_HOME=${XDG_DATA_HOME:-~/.local/share}
|
||||
VENV_NAME="letsencrypt"
|
||||
VENV_PATH=${VENV_PATH:-"$XDG_DATA_HOME/$VENV_NAME"}
|
||||
|
||||
# virtualenv call is not idempotent: it overwrites pip upgraded in
|
||||
# later steps, causing "ImportError: cannot import name unpack_url"
|
||||
if [ ! -d $VENV_PATH ]
|
||||
then
|
||||
virtualenv --no-site-packages --python python2 $VENV_PATH
|
||||
fi
|
||||
|
||||
. $VENV_PATH/bin/activate
|
||||
pip install -U setuptools
|
||||
pip install -U pip
|
||||
|
||||
# TODO: install apache and nginx plugins by default?
|
||||
# --pre is not necessary for dev releases in more recent pip versions
|
||||
pip install -U letsencrypt letsencrypt-apache letsencrypt-nginx
|
||||
|
||||
echo
|
||||
echo "Congratulations, Let's Encrypt has been successfully installed/updated!"
|
||||
echo
|
||||
echo -n "Your prompt should now be prepended with ($VENV_NAME). Next "
|
||||
echo -n "time, if the prompt is different, 'source' this script again "
|
||||
echo -n "before running 'letsencrypt'."
|
||||
echo
|
||||
echo
|
||||
echo "You can now run 'letsencrypt --help'."
|
||||
|
|
@ -122,15 +122,9 @@ bash``.
|
|||
Installation
|
||||
============
|
||||
|
||||
.. "pip install acme" doesn't search for "acme" in cwd, just like "pip
|
||||
install -e acme" does; `-U setuptools pip` necessary for #722
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
virtualenv --no-site-packages -p python2 venv
|
||||
./venv/bin/pip install -U setuptools
|
||||
./venv/bin/pip install -U pip
|
||||
./venv/bin/pip install -r requirements.txt acme/ . letsencrypt-apache/ letsencrypt-nginx/
|
||||
source ./bootstrap/venv.sh
|
||||
|
||||
.. warning:: Please do **not** use ``python setup.py install``. Please
|
||||
do **not** attempt the installation commands as
|
||||
|
|
@ -148,13 +142,13 @@ To get a new certificate run:
|
|||
|
||||
.. code-block:: shell
|
||||
|
||||
sudo ./venv/bin/letsencrypt auth
|
||||
(letsencrypt)$ letsencrypt auth
|
||||
|
||||
The ``letsencrypt`` commandline tool has a builtin help:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
./venv/bin/letsencrypt --help
|
||||
(letsencrypt)$ letsencrypt --help
|
||||
|
||||
|
||||
Configuration file
|
||||
|
|
|
|||
Loading…
Reference in a new issue