Changeset - 34306a93f85e
[Not reviewed]
0 1 0
Lance Edgar (lance) - 7 years ago 2018-01-15 14:48:18
lance@edbob.org
Allow certbot to be installed from source, even if package is available
1 file changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rattail/fablib/certbot.py
Show inline comments
 
@@ -29,16 +29,23 @@ from __future__ import unicode_literals, absolute_import
 
from fabric.api import sudo, cd, abort
 
from fabric.contrib.files import exists
 

	
 
from rattail.fablib import apt, get_debian_version
 

	
 

	
 
def install():
 
def install(source=False):
 
    """
 
    Install the Let's Encrypt certbot utility
 
    """
 
    if source:
 
        if not exists('/usr/local/src/certbot'):
 
            with cd('/usr/local/src'):
 
                sudo('git clone https://github.com/certbot/certbot')
 
        sudo('ln --symbolic --force /usr/local/src/certbot/certbot-auto /usr/local/bin/certbot')
 

	
 
    else:
 
        version = get_debian_version()
 

	
 
        # debian 7 wheezy
 
        if 7 <= version < 8:
 
            if not exists('/usr/local/src/certbot'):
 
                with cd('/usr/local/src'):
0 comments (0 inline, 0 general)