Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open
certbot-haproxy
Commits
b2a251ea
Commit
b2a251ea
authored
May 09, 2019
by
Maarten de Waard
👼
Browse files
fix typo in certbot-deploy-hook-example, remove some newlines
parent
58afe5c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
certbot-deploy-hook-example
View file @
b2a251ea
...
...
@@ -13,7 +13,6 @@ lineage=os.environ.get('RENEWED_LINEAGE')
if
not
lineage
:
sys
.
exit
()
# From the linage, we strip the 'domain name', which is the last part
# of the path.
result
=
re
.
match
(
r
'.*/live/(.+)$'
,
lineage
)
...
...
@@ -25,11 +24,10 @@ if not result:
# Extract the domain name
domain
=
result
.
group
(
1
)
# Define a path for HAproxy where you want to write the .pem file.
deploy_path
=
"/etc/haproxy/ssl/"
+
domain
+
".pem"
# The source files can be found in below paths, constructed w
u
th the lineage
# The source files can be found in below paths, constructed w
i
th the lineage
# path
source_key
=
lineage
+
"/privkey.pem"
source_chain
=
lineage
+
"/fullchain.pem"
...
...
@@ -41,13 +39,11 @@ with open(deploy_path, "w") as deploy, \
deploy
.
write
(
key
.
read
())
deploy
.
write
(
chain
.
read
())
# Here you can add your service reload command. Which will be executed after
# every renewal, which is fine if you only have a few domains.
# Alternative is to add the reload to the --post-hook. In that case it is only
# r
a
n once after all renewals. That would be the use-case if you have a large
# r
u
n once after all renewals. That would be the use-case if you have a large
# number of different certificates served by HAproxy.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment