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 @@
# -*- coding: utf-8 -*-
import os
import re
import subprocess
import utils
......@@ -25,13 +26,20 @@ def setup(interactive=True):
utils.log('The configuration does not use the default certificate, letsencrypt will not be used.')
return
# Install certbot
cmds = [
'apt-get update',
'apt-get install -y software-properties-common',
'add-apt-repository ppa:certbot/certbot -y',
lsb_release = subprocess.run(['lsb_release', '-a'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout
if b'Ubuntu' in lsb_release:
# Add repo if OS is Ubuntu
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 install -y certbot',
]
])
utils.run_commands(cmds)
# Get system domains
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