Install python3-certbot-apache for debian 10
when applicable
This commit is contained in:
		
							parent
							
								
									039af4b394
								
							
						
					
					
						commit
						7fe63b9f19
					
				
					 1 changed files with 12 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
################################################################################
 | 
			
		||||
#
 | 
			
		||||
#  Rattail -- Retail Software Framework
 | 
			
		||||
#  Copyright © 2010-2018 Lance Edgar
 | 
			
		||||
#  Copyright © 2010-2019 Lance Edgar
 | 
			
		||||
#
 | 
			
		||||
#  This file is part of Rattail.
 | 
			
		||||
#
 | 
			
		||||
| 
						 | 
				
			
			@ -24,8 +24,6 @@
 | 
			
		|||
Fabric library for Let's Encrypt certbot
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
from __future__ import unicode_literals, absolute_import
 | 
			
		||||
 | 
			
		||||
from rattail_fabric2 import apt, exists, get_debian_version
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -52,8 +50,8 @@ def install(c, source=False, service='apache'):
 | 
			
		|||
            apt.add_source(c, 'deb http://ftp.debian.org/debian jessie-backports main')
 | 
			
		||||
            apt.install(c, 'python-certbot-apache', target_release='jessie-backports')
 | 
			
		||||
 | 
			
		||||
        # debian 9 stretch, or later
 | 
			
		||||
        elif version >= 9:
 | 
			
		||||
        # debian 9 stretch
 | 
			
		||||
        elif 9 <= version < 10:
 | 
			
		||||
            if service == 'apache':
 | 
			
		||||
                apt.install(c, 'python-certbot-apache')
 | 
			
		||||
            elif service == 'nginx':
 | 
			
		||||
| 
						 | 
				
			
			@ -61,6 +59,15 @@ def install(c, source=False, service='apache'):
 | 
			
		|||
            else:
 | 
			
		||||
                raise NotImplementedError("unknown web service: {}".format(service))
 | 
			
		||||
 | 
			
		||||
        # debian 10 buster, or later
 | 
			
		||||
        elif version >= 10:
 | 
			
		||||
            if service == 'apache':
 | 
			
		||||
                apt.install(c, 'python3-certbot-apache')
 | 
			
		||||
            elif service == 'nginx':
 | 
			
		||||
                apt.install(c, 'python3-certbot-nginx')
 | 
			
		||||
            else:
 | 
			
		||||
                raise NotImplementedError("unknown web service: {}".format(service))
 | 
			
		||||
 | 
			
		||||
        # other..? will have to investigate when this comes up
 | 
			
		||||
        else:
 | 
			
		||||
            raise NotImplementedError("don't know how to install certbot on debian version {}".format(version))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue