fix: remove lock after synchronization
This commit is contained in:
parent
fb40860f31
commit
d39cd11605
1 changed files with 16 additions and 18 deletions
18
certbotd.sh
18
certbotd.sh
|
@ -11,10 +11,7 @@ updated=/tmp/certbot.updated
|
|||
ensure() {
|
||||
test -n "$1" && echo "ok - $1 received, exiting gracefully..." >&2
|
||||
|
||||
rm -f "${lock}"
|
||||
|
||||
test -f "${updated}" || exit 0
|
||||
|
||||
if test -f "${updated}" ; then
|
||||
rm -f "${updated}"
|
||||
|
||||
# Fix permissions, users in group ssl have read access
|
||||
|
@ -22,15 +19,16 @@ ensure() {
|
|||
find /etc/letsencrypt -type f | xargs -r chmod 640
|
||||
chgrp -R ssl /etc/letsencrypt
|
||||
|
||||
${SINGLE_NODE:-false} && exit 0
|
||||
|
||||
# Push certificates to nodes, we use SSH as a secure transport
|
||||
# but this means we're synchronizing from container to host which is
|
||||
# awkward. A restricted rsync treats / as the remote location for the
|
||||
# certificates.
|
||||
if ! ${SINGLE_NODE:-false}; then
|
||||
for NODE in ${NODES}; do
|
||||
rsync -avHAXL --delete-after /etc/letsencrypt/live/ ${NODE}/ || continue
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# Remove the lock after synchronization
|
||||
rm -f "${lock}"
|
||||
|
||||
}
|
||||
|
||||
for SIG in TERM QUIT INT HUP; do
|
||||
|
|
Loading…
Reference in a new issue