mirror of
https://github.com/linuxserver/docker-swag.git
synced 2026-04-04 04:00:51 +09:00
use certbot file hooks instead of command line hooks
This commit is contained in:
@@ -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
|
||||
13
root/defaults/etc/letsencrypt/renewal-hooks/post/10-nginx
Normal file
13
root/defaults/etc/letsencrypt/renewal-hooks/post/10-nginx
Normal 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
|
||||
9
root/defaults/etc/letsencrypt/renewal-hooks/pre/10-nginx
Normal file
9
root/defaults/etc/letsencrypt/renewal-hooks/pre/10-nginx
Normal 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
|
||||
Reference in New Issue
Block a user