use certbot file hooks instead of command line hooks

This commit is contained in:
Feilner
2021-02-15 19:02:26 +01:00
committed by Eric Nemchik
parent 29a1c29be3
commit 51dc4ce7b2
8 changed files with 80 additions and 69 deletions

View File

@@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bash
cd /config/keys/letsencrypt || exit 1
openssl pkcs12 -export -out privkey.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem -passout pass:
sleep 1
cat {privkey,fullchain}.pem >priv-fullchain-bundle.pem
chown -R abc:abc /config/etc/letsencrypt

View File

@@ -0,0 +1,13 @@
#!/usr/bin/with-contenv bash
. /config/.donoteditthisfile.conf
if [ ! "$ORIGVALIDATION" = "dns" ] && [ ! "$ORIGVALIDATION" = "duckdns" ]; then
if ps aux | grep 's6-supervise nginx' | grep -v grep >/dev/null; then
s6-svc -u /run/service/nginx
fi
else
if ps aux | grep [n]ginx: >/dev/null; then
s6-svc -h /run/service/nginx
fi
fi

View File

@@ -0,0 +1,9 @@
#!/usr/bin/with-contenv bash
. /config/.donoteditthisfile.conf
if [ ! "$ORIGVALIDATION" = "dns" ] && [ ! "$ORIGVALIDATION" = "duckdns" ]; then
if ps aux | grep [n]ginx: >/dev/null; then
s6-svc -d /run/service/nginx
fi
fi