Some controls improvements for certbot.
This commit is contained in:
parent
c86d4a02e9
commit
22cac26555
6 changed files with 70 additions and 31 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue