#!/bin/bash path=$1 if zfs list -H -o mountpoint | grep -q "$path" then /opt/backup/backup_path_via_zfs "$path" elif test -d "$path" then /opt/backuo/backup_path_via_rsync "$path" else echo "UNKNOWN PATH: $path" exit 1 fi