From 505bdb9117cbba63109b14ce6b4328216f4743c0 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 28 May 2020 10:22:34 +0200 Subject: [PATCH] On sync, add trailing slash to rsync command --- CHANGELOG.md | 2 ++ lib/bkctld-sync | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d69aab0..941c13f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +* On sync, add trailing slash to rsync command + ### Security ## [2.3.2] - 2020-05-03 diff --git a/lib/bkctld-sync b/lib/bkctld-sync index c228697..cb87311 100755 --- a/lib/bkctld-sync +++ b/lib/bkctld-sync @@ -29,7 +29,7 @@ fi rsync -a "${jail_path}/" "${NODE}:${jail_path}/" --exclude proc/* --exclude sys/* --exclude dev/* --exclude run --exclude var/backup/* # Sync config (new structure) if [ -d "${jail_config_dir}" ]; then - rsync -a --delete "${jail_config_dir}" "${NODE}:${jail_config_dir}" + rsync -a --delete "${jail_config_dir}/" "${NODE}:${jail_config_dir}/" else ssh "${NODE}" "rm -rf ${jail_config_dir}" | debug fi