certbot: sync_remote excludes itself

This commit is contained in:
Jérémy Lecour 2021-06-30 07:39:57 +02:00 committed by Jérémy Lecour
parent 2ed1dac16b
commit 51462c724c
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,8 @@ The **patch** part changes incrementally at each release.
### Fixed
* certbot: sync_remote excludes itself
### Removed
### Security

View File

@ -40,7 +40,7 @@ main() {
rsync --archive --copy-links --delete "${RENEWED_LINEAGE}/" "${remote_host}:${remote_lineage}/" \
|| error "Couldn't sync certificate on ${server}"
rsync --archive --copy-links --delete --exclude $0 --delete-excluded "${hooks_dir}/" "${remote_host}:${remote_dir}/hooks/" \
rsync --archive --copy-links --delete --exclude "$(basename "$0")" --delete-excluded "${hooks_dir}/" "${remote_host}:${remote_dir}/hooks/" \
|| error "Couldn't sync hooks on ${server}"
# shellcheck disable=SC2029