check if rsync installed

This commit is contained in:
Pavel Kuleshov 2023-03-18 10:36:13 +08:00
parent 418460f5cc
commit 4dae05ba2c

View File

@ -19,6 +19,12 @@ delete_archive=true
archive_with_date=true
#archive_with_date=false
if ! which rsync >/dev/null 2>&1; then
echo "rsync is not installed. Installing..."
sudo apt-get update
sudo apt-get install -y rsync
fi
if [ "$mode" == "files" ]; then
rsync -a --exclude-from=$exclude_file --password-file=$password_file $source $user@$ip::$destination
else