This commit is contained in:
Amarpreet Minhas 2021-01-23 16:23:06 -05:00
parent 6e121d61c3
commit b6f355b5c0

View file

@ -1,9 +1,11 @@
#!/bin/bash #!/bin/bash
SOURCE_PEM=/etc/lego/certificates/{{ item.name }}.pem export SOURCE_PEM=/etc/lego/certificates/{{ item.name }}.pem
DEST_PEM=/etc/haproxy/certs/{{ item.name }}.pem export DEST_PEM=/etc/haproxy/certs/{{ item.name }}.pem
if [ -e ${DEST_PEM} ]; then if [ -e ${DEST_PEM} ]; then
if [ $(diff ${SOURCE_PEM} ${DEST_PEM}) == 0 ]; then diff ${SOURCE_PEM} ${DEST_PEM}
diff_rc=$?
if [ ${diff_rc} == 0 ]; then
exit exit
fi fi
cp ${SOURCE_PEM} ${DEST_PEM} cp ${SOURCE_PEM} ${DEST_PEM}