@@ -37,12 +37,12 @@ printf "snap-sync comes with ABSOLUTELY NO WARRANTY. This is free software, and
3737SNAPPER_CONFIG=/etc/conf.d/snapper
3838
3939donotify=0
40- if ! which notify-send & > /dev/null; then
40+ if ! command -v notify-send & > /dev/null; then
4141 donotify=1
4242fi
4343
4444doprogress=0
45- if ! which pv & > /dev/null; then
45+ if ! command -v pv & > /dev/null; then
4646 doprogress=1
4747fi
4848
@@ -84,7 +84,7 @@ Options:
8484 -n, --noconfirm do not ask for confirmation
8585 -k, --keepold keep old incremental snapshots instead of deleting them
8686 after backup is performed
87- -p, --port <port> remote port; wsed with '--remote'.
87+ -p, --port <port> remote port; used with '--remote'.
8888 -q, --quiet do not send notifications; instead print them.
8989 -r, --remote <address> ip address of a remote machine to backup to
9090 --sudo use sudo on the remote machine
@@ -182,6 +182,12 @@ uuid_cmdline=${uuid_cmdline:-"none"}
182182subvolid_cmdline=${subvolid_cmdline:- " 5" }
183183noconfirm=${noconfirm:- " no" }
184184
185+ if [[ -z $remote ]]; then
186+ if ! command -v rsync & > /dev/null; then
187+ die " --remote specified but rsync command not found"
188+ fi
189+ fi
190+
185191if [[ " $uuid_cmdline " != " none" ]]; then
186192 if [[ -z $remote ]]; then
187193 notify_info " Backup started" " Starting backups to $uuid_cmdline subvolid=$subvolid_cmdline ..."
0 commit comments