dot

packages and services management
Log | Files | Refs | README

commit 09f641f5d13092373adf35305b501355ef863356
parent 82ff37bd5e9535c941656fa92f2cbe7f85c491bb
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 20 Oct 2018 13:56:57 +0200

fix acme-client run scripts

Diffstat:
Ms6/acme-client-log/consumer-for | 2+-
Ds6/acme-client-run/run | 5-----
Ds6/acme-client-snooze/env/ACCOUNTKEY | 1-
As6/acme-client-snooze/env/AGREEMENT_URL | 1+
As6/acme-client-snooze/env/BASEDIR | 1+
Ds6/acme-client-snooze/env/CERTDIR | 1-
Ds6/acme-client-snooze/env/CHALLENGEDIR | 1-
Ds6/acme-client-snooze/env/DOMAINKEY | 1-
As6/acme-client-snooze/env/SSLDIR | 1+
Ms6/acme-client-snooze/producer-for | 2+-
Ms6/acme-client-snooze/run | 28+++++++++++++++++-----------
11 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/s6/acme-client-log/consumer-for b/s6/acme-client-log/consumer-for @@ -1 +1 @@ -acme-client-run +acme-client-snooze diff --git a/s6/acme-client-run/run b/s6/acme-client-run/run @@ -1,5 +0,0 @@ -#!/usr/bin/env execlineb - -snooze - -acme-client diff --git a/s6/acme-client-snooze/env/ACCOUNTKEY b/s6/acme-client-snooze/env/ACCOUNTKEY @@ -1 +0,0 @@ -/etc/acme/privkey.pem diff --git a/s6/acme-client-snooze/env/AGREEMENT_URL b/s6/acme-client-snooze/env/AGREEMENT_URL @@ -0,0 +1 @@ +https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf diff --git a/s6/acme-client-snooze/env/BASEDIR b/s6/acme-client-snooze/env/BASEDIR @@ -0,0 +1 @@ +/var/www/plain diff --git a/s6/acme-client-snooze/env/CERTDIR b/s6/acme-client-snooze/env/CERTDIR @@ -1 +0,0 @@ -/etc/ssl/acme diff --git a/s6/acme-client-snooze/env/CHALLENGEDIR b/s6/acme-client-snooze/env/CHALLENGEDIR @@ -1 +0,0 @@ -/var/www/acme diff --git a/s6/acme-client-snooze/env/DOMAINKEY b/s6/acme-client-snooze/env/DOMAINKEY @@ -1 +0,0 @@ -/etc/ssl/acme/private/privkey.pem diff --git a/s6/acme-client-snooze/env/SSLDIR b/s6/acme-client-snooze/env/SSLDIR @@ -0,0 +1 @@ +/etc/ssl diff --git a/s6/acme-client-snooze/producer-for b/s6/acme-client-snooze/producer-for @@ -1 +1 @@ -snooze-acme-client-log +acme-client-log diff --git a/s6/acme-client-snooze/run b/s6/acme-client-snooze/run @@ -1,19 +1,25 @@ #!/usr/bin/env execlineb +# It uses ":well-known" instead of ".well-known" because httpfile(1) +# translates ':' to '.'. + fdmove -c 2 1 s6-envdir env multisubstitute { - importas CHALLENGEDIR CHALLENGEDIR - importas CERTDIR CERTDIR - importas DOMAINKEY DOMAINKEY - importas ACCOUNTKEY ACCOUNTKEY - importas DOMAIN DOMAIN + importas -n AGREEMENT_URL AGREEMENT_URL + importas -n BASEDIR BASEDIR + importas -n SSLDIR SSLDIR + importas -n DOMAIN DOMAIN } -if { mkdir -p $CHALLENGEDIR $CERTDIR /var/www/plain/${DOMAIN}/.well-known/ } -if { ln -sf ../../../acme/ /var/www/plain/${DOMAIN}/.well-known/acme-challenge } +if { mkdir -p ${BASEDIR}/${DOMAIN}/:well-known/acme-challenge } +if { mkdir -p ${SSLDIR}/${DOMAIN} } +if { mkdir -p ${SSLDIR}/private } +if { chmod 700 ${SSLDIR}/private } + snooze -d1 acme-client -vnN - -C $CHALLENGEDIR - -c $CERTDIR - -k $DOMAINKEY - -f $ACCOUNTKEY + -a $AGREEMENT_URL + -C ${BASEDIR}/${DOMAIN}/:well-known/acme-challenge + -c ${SSLDIR}/${DOMAIN} + -k ${SSLDIR}/${DOMAIN}/privkey.pem + -f ${SSLDIR}/private/privkey.pem $DOMAIN