92
edits
No edit summary |
mNo edit summary |
||
| Line 16: | Line 16: | ||
<code>staging-elearning.nl.zone</code> | <code>staging-elearning.nl.zone</code> | ||
<pre> | <pre lang="bash"> | ||
$ORIGIN staging-elearning.nl. | $ORIGIN staging-elearning.nl. | ||
$TTL 3600 | $TTL 3600 | ||
| Line 59: | Line 59: | ||
'''ELEARNING_FQDN''': This is the fully qualified domain name (FQDN) of the primary domain for which wildcard SSL certificates will be issued. <code>staging-elearning.nl</code> for this guide example. | '''ELEARNING_FQDN''': This is the fully qualified domain name (FQDN) of the primary domain for which wildcard SSL certificates will be issued. <code>staging-elearning.nl</code> for this guide example. | ||
Here’s how to set these variables in <code>debian/templates</code>, define prompts in <code>debian/config</code>, and retrieve them in <code>debian/postinst</code>. | |||
in <code>debian/templates</code>, add the following entries to create prompt templates for each variable: | |||
<pre lang="bash"> | |||
... | |||
Template: kaboom-api/DNS_AUTHENTICATION | |||
Type: string | |||
Default: | |||
Description: DNS authentication string in the following format: dns://<key_name>:<key_algorithm>~<key_secret_base64>@<authoritative_nameserver_domainname> | |||
Template: kaboom-api/CERTBOT_EMAIL | |||
Type: string | |||
Default: | |||
Description: Enter the email that certificate issues should be reported to. Entering this will result in accepting the Let's Encrypt terms and conditions. | |||
Template: kaboom-api/ELEARNING_FQDN | |||
Type: string | |||
Default: | |||
Description: Enter the fully qualified domain name used for e-learnings | |||
... | |||
</pre> | |||
Add the following lines to your <code>debian/config</code> file to prompt for these variables during configuration: | |||
in <code>debian/templates</code>, add the following entries to create prompt templates for each variable: | |||
<pre lang="bash"> | |||
… | |||
db_input medium kaboom-api/CERTBOT_EMAIL || true | |||
db_input medium kaboom-api/DNS_AUTHENTICATION || true | |||
db_input medium kaboom-api/ELEARNING_FQDN || true | |||
… | |||
</pre> | |||
In <code>debian/postinst</code>, retrieve the stored values with the following lines: | |||
<pre lang="bash"> | |||
… | |||
db_get kaboom-api/DNS_AUTHENTICATION | |||
DNS_AUTHENTICATION="$RET" | |||
db_get kaboom-api/CERTBOT_EMAIL | |||
CERTBOT_EMAIL="$RET" | |||
db_get kaboom-api/ELEARNING_FQDN | |||
ELEARNING_FQDN="$RET" | |||
… | |||
</pre> | |||
edits