check if rsync installed
This commit is contained in:
parent
418460f5cc
commit
4dae05ba2c
@ -19,6 +19,12 @@ delete_archive=true
|
|||||||
archive_with_date=true
|
archive_with_date=true
|
||||||
#archive_with_date=false
|
#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
|
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
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user