Fix cron
This commit is contained in:
parent
6e121d61c3
commit
b6f355b5c0
1 changed files with 5 additions and 3 deletions
|
@ -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}
|
||||||
|
|
Loading…
Reference in a new issue