13 lines
310 B
Django/Jinja
13 lines
310 B
Django/Jinja
#!/bin/bash
|
|
SOURCE_PEM=/etc/lego/certificates/{{ item.name }}.pem
|
|
DEST_PEM=/etc/haproxy/certs/{{ item.name }}.pem
|
|
|
|
if [ -e ${DEST_PEM} ]; then
|
|
if [ $(diff ${SOURCE_PEM} ${DEST_PEM}) == 0 ]; then
|
|
exit
|
|
fi
|
|
cp ${SOURCE_PEM} ${DEST_PEM}
|
|
chown haproxy:haproxy ${DEST_PEM}
|
|
systemctl reload haproxy
|
|
fi
|