1
0
Fork 0

Some controls improvements for certbot.

This commit is contained in:
Joao M 2022-08-15 14:27:49 +00:00
parent c86d4a02e9
commit 22cac26555
6 changed files with 70 additions and 31 deletions

View file

@ -35,11 +35,12 @@ if [ -n "$REQUEST_CERTS" ]; then
--non-interactive \
--max-log-backups=0 \
--post-hook "/scripts/certbot_to_haproxy.sh" \
$REQUEST_CERTS --email info@xpto.us
$REQUEST_CERTS --email $EASYHAPROXY_LETSENCRYPT_EMAIL
fi
if [ -n "$RENEW_CERTS" ]; then
certbot renew --post-hook "/scripts/certbot_to_haproxy.sh"
fi
# Release semaphore
rm /tmp/certbot-lock

View file

@ -8,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
done
# It will be checked on haproxy-reload.sh
touch /tmp/force-reload

View file

@ -11,7 +11,7 @@ def main():
headers, payload = childutils.listener.wait()
childutils.listener.ok()
events = ['PROCESS_STATE_FATAL', 'PROCESS_STATE_EXITED', 'PROCESS_STATE_STOPPED']
if not (headers['eventname'] in events):
if headers['eventname'] not in events:
continue
print(headers)