diff --git a/btrfs-snapshots.sh b/btrfs-snapshots.sh index 456c16d..65586d2 100755 --- a/btrfs-snapshots.sh +++ b/btrfs-snapshots.sh @@ -6,7 +6,7 @@ TMP_MNT=${TMP_MNT:-/var/tmp/btrfs-backup} vols=() del= dryrun=0 -periodity=${a%/*} +periodity=${0%/*} periodity=${periodity##*/} if [[ $periodity =~ ^cron\... ]]; then periodity=${periodity#cron} diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..51fb569 --- /dev/null +++ b/install.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for f in hourly daily weekly monthly; do + sudo cp btrfs-snapshots.sh /etc/cron.$f/btrfs-snapshots; +done