Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
letsencrypt.sh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
letsencrypt.sh
Commits
f1bea8ab
Commit
f1bea8ab
authored
Jan 22, 2016
by
Jan Tore Morken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hook script example.
parent
ef7a3adb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
hook.sh.example
hook.sh.example
+53
-0
No files found.
hook.sh.example
0 → 100644
View file @
f1bea8ab
#!/bin/bash
function
deploy_challenge
{
local
DOMAIN
=
"
${
1
}
"
TOKEN_FILENAME
=
"
${
2
}
"
TOKEN_VALUE
=
"
${
3
}
"
# This hook is called once for every domain that needs to be
# validated, including any alternative names you may have listed.
#
# Parameters:
# - DOMAIN
# The domain name (CN or subject alternative name) being
# validated.
# - TOKEN_FILENAME
# The name of the file containing the token to be served for HTTP
# validation. Should be served by your web server as
# /.well-known/acme-challenge/${TOKEN_FILENAME}.
# - TOKEN_VALUE
# The token value that needs to be served for validation. For DNS
# validation, this is what you want to put in the _acme-challenge
# TXT record. For HTTP validation it is the value that is expected
# be found in the $TOKEN_FILENAME file.
}
function
clean_challenge
{
local
DOMAIN
=
"
${
1
}
"
TOKEN_FILENAME
=
"
${
2
}
"
TOKEN_VALUE
=
"
${
3
}
"
# This hook is called after attempting to validate each domain,
# whether or not validation was successful. Here you can delete
# files or DNS records that are no longer needed.
#
# The parameters are the same as for deploy_challenge.
}
function
deploy_cert
{
local
DOMAIN
=
"
${
1
}
"
KEYFILE
=
"
${
2
}
"
CERTFILE
=
"
${
3
}
"
CHAINFILE
=
"
${
4
}
"
# This hook is called once for each certificate that has been
# produced. Here you might, for instance, copy your new certificates
# to service-specific locations and reload the service.
#
# Parameters:
# - DOMAIN
# The primary domain name, i.e. the certificate common
# name (CN).
# - KEYFILE
# The path of the file containing the private key.
# - CERTFILE
# The path of the file containing the signed certificate.
# - CHAINFILE
# The path of the file containing the full certificate chain.
}
HANDLER
=
$1
;
shift
;
$HANDLER
$@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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