On sync, add trailing slash to rsync command

This commit is contained in:
Jérémy Lecour 2020-05-28 10:22:34 +02:00 committed by Jérémy Lecour
parent 80fb38d534
commit 505bdb9117
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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