summaryrefslogtreecommitdiff
path: root/config-certbot.PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'config-certbot.PKGBUILD')
-rw-r--r--config-certbot.PKGBUILD29
1 files changed, 13 insertions, 16 deletions
diff --git a/config-certbot.PKGBUILD b/config-certbot.PKGBUILD
index caff71c..77b6e56 100644
--- a/config-certbot.PKGBUILD
+++ b/config-certbot.PKGBUILD
@@ -1,5 +1,5 @@
. ${BUILDFILE%/*}/common.sh
-pkgver=20160713.4
+pkgver=20160713.5
depends=(certbot)
@@ -22,20 +22,18 @@ cd "$pkgdir"
# add this domain as a Subject Alternative Name". You have to re-run
# the same (long) command to get the cert, but with the domain added.
# So, I've encapsulated this into the script
-# `/etc/ssl/misc/certbot-get`. Edit the array of domains at the top
-# of the script, then run it.
+# `/etc/ssl/misc/certbot-get`. Edit `/etc/ssl/misc/certbot-get.d/` to
+# manipulate the list of domains, then run the script.
add-file -m755 etc/ssl/misc/certbot-get <<<'#!/bin/bash
-
-# The first name listed should be the canonical host name
-domains=(
- winston.parabola.nu
- {git,projects}.{parabola.nu,parabolagnulinux.org}
-)
-
-########################################################################
{
set -eu
+ # The first name listed should be the canonical host name
+ domains=(
+ $(hostname -f)
+ $(find -L "$0.d" -type f -executable -exec {} \;)
+ )
+
if [[ "`whoami`" != '\''keys'\'' ]]; then
>&2 printf '\''%q: This script must be run as user `%s'\''\'\'''\''\n'\'' "$0" keys
exit 1
@@ -45,11 +43,10 @@ domains=(
Our "\`${0##*/}\`" script is used to '\''*add*'\'' or
'\''*remove*'\'' certificates\; use '\''`certbot renew`'\'' to
- renew them. To use "${0##*/}," edit the
- '\''hostnames=()'\'' list of domains at the beginning of the
- script, '\''then'\'' run it to get a new certificate with a
- new Subject Alternative Name field matching the new
- list of domains.
+ renew them. To use "${0##*/}," edit "\`${0##*/}.d/\`" to
+ manipulate the list of domains, '\''then'\'' run it to get a
+ new certificate with a new Subject Alternative Name field
+ matching the new list of domains.
$'\''\n\n'\''Are you sure that you are ready to run this?
It will eat into the "Let'\''s Encrypt" usage limit.