More adjusts to Lets Encrypt
This commit is contained in:
parent
9fa9dc9841
commit
bf2d3308a6
4 changed files with 3 additions and 7 deletions
|
|
@ -6,5 +6,4 @@
|
||||||
0 3 * * 6 run-parts /etc/periodic/weekly
|
0 3 * * 6 run-parts /etc/periodic/weekly
|
||||||
0 5 1 * * run-parts /etc/periodic/monthly
|
0 5 1 * * run-parts /etc/periodic/monthly
|
||||||
* * * * * /scripts/haproxy-reload.sh
|
* * * * * /scripts/haproxy-reload.sh
|
||||||
#*/2 * * * * /scripts/certbot.sh
|
*/2 * * * * /scripts/certbot.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
@todo
|
|
||||||
|
|
||||||
mkdir -p /var/log/letsencrypt
|
mkdir -p /var/log/letsencrypt
|
||||||
ln -sf /dev/stdout /var/log/letsencrypt/letsencrypt.log
|
ln -sf /dev/stdout /var/log/letsencrypt/letsencrypt.log
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# @todo
|
|
||||||
|
|
||||||
# Loop through all Let's Encrypt certificates
|
# Loop through all Let's Encrypt certificates
|
||||||
for CERTIFICATE in `find /etc/letsencrypt/live/* -type d`; do
|
for CERTIFICATE in `find /etc/letsencrypt/live/* -type d`; do
|
||||||
CERTIFICATE=`basename $CERTIFICATE`
|
CERTIFICATE=`basename $CERTIFICATE`
|
||||||
|
|
@ -10,4 +8,5 @@ for CERTIFICATE in `find /etc/letsencrypt/live/* -type d`; do
|
||||||
cat /etc/letsencrypt/live/$CERTIFICATE/fullchain.pem /etc/letsencrypt/live/$CERTIFICATE/privkey.pem > /etc/haproxy/certs/$CERTIFICATE.pem
|
cat /etc/letsencrypt/live/$CERTIFICATE/fullchain.pem /etc/letsencrypt/live/$CERTIFICATE/privkey.pem > /etc/haproxy/certs/$CERTIFICATE.pem
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Reloading certificates... "
|
||||||
/usr/sbin/haproxy -W -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -x /var/run/haproxy.sock -sf $(cat /run/haproxy.pid) &
|
/usr/sbin/haproxy -W -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -x /var/run/haproxy.sock -sf $(cat /run/haproxy.pid) &
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ class HaproxyConfigGenerator:
|
||||||
}
|
}
|
||||||
easymapping["443"]["hosts"][d[host_label]] = dict(easymapping[port]["hosts"][d[host_label]])
|
easymapping["443"]["hosts"][d[host_label]] = dict(easymapping[port]["hosts"][d[host_label]])
|
||||||
easymapping["443"]["hosts"][d[host_label]]["letsencrypt"] = False
|
easymapping["443"]["hosts"][d[host_label]]["letsencrypt"] = False
|
||||||
|
easymapping["443"]["ssl_cert"] = "/etc/haproxy/certs"
|
||||||
|
|
||||||
|
|
||||||
# handle SSL
|
# handle SSL
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue