Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
cfa98517
Commit
cfa98517
authored
5 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Do not add certbot repo for Debian
parent
d1ff0ec7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
2.Common_services/7.LetsEncrypt/0_setup.py
+13
-5
13 additions, 5 deletions
2.Common_services/7.LetsEncrypt/0_setup.py
with
13 additions
and
5 deletions
2.Common_services/7.LetsEncrypt/0_setup.py
+
13
−
5
View file @
cfa98517
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment