delete files

This commit is contained in:
Pavel Kuleshov 2023-11-13 19:40:10 +08:00
parent 4dae05ba2c
commit dc5f6bd932

View File

@ -27,6 +27,9 @@ fi
if [ "$mode" == "files" ]; then if [ "$mode" == "files" ]; then
rsync -a --exclude-from=$exclude_file --password-file=$password_file $source $user@$ip::$destination rsync -a --exclude-from=$exclude_file --password-file=$password_file $source $user@$ip::$destination
if [ $? -eq 0 ] && [ "$delete_archive" = true ]; then
rm -rf $source/*
fi
else else
mkdir -p $archive_dir mkdir -p $archive_dir