Skip to content
Snippets Groups Projects
Commit cfa98517 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Do not add certbot repo for Debian

parent d1ff0ec7
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
import re import re
import subprocess
import utils import utils
...@@ -25,13 +26,20 @@ def setup(interactive=True): ...@@ -25,13 +26,20 @@ def setup(interactive=True):
utils.log('The configuration does not use the default certificate, letsencrypt will not be used.') utils.log('The configuration does not use the default certificate, letsencrypt will not be used.')
return return
# Install certbot # Install certbot
cmds = [ lsb_release = subprocess.run(['lsb_release', '-a'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout
'apt-get update', if b'Ubuntu' in lsb_release:
'apt-get install -y software-properties-common', # Add repo if OS is Ubuntu
'add-apt-repository ppa:certbot/certbot -y', cmds = [
'apt-get update',
'apt-get install -y software-properties-common',
'add-apt-repository ppa:certbot/certbot -y',
]
else:
cmds = []
cmds.extend([
'apt-get update', 'apt-get update',
'apt-get install -y certbot', 'apt-get install -y certbot',
] ])
utils.run_commands(cmds) utils.run_commands(cmds)
# Get system domains # Get system domains
domains = list() domains = list()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment