check if rsync installed

main
Pavel Kuleshov 1 year ago
parent 418460f5cc
commit 4dae05ba2c

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

Loading…
Cancel
Save