diff --git a/README.md b/README.md index 6f64f47..c896657 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,25 @@ This is the Ubuntu/APT counterpart to [zfs-pacman-hook](https://quico.space/quic ## Setup -Install the files as follows: +Clone this repository into an arbitrary location ``. Install the +executable and APT hook as symlinks so that changes in the checkout are +immediately available. Install the runtime configuration as a copy so that +local configuration is not tied to the repository checkout: ```bash -sudo install -Dm755 apt-zfs-snapshot.sh /usr/local/sbin/apt-zfs-snapshot -sudo install -Dm644 apt-zfs-snapshot.conf /etc/apt-zfs-snapshot.conf -sudo install -Dm644 90apt-zfs-snapshot.conf /etc/apt/apt.conf.d/90apt-zfs-snapshot.conf +sudo chmod +x /apt-zfs-snapshot.sh +sudo ln -s /apt-zfs-snapshot.sh \ + /usr/local/sbin/apt-zfs-snapshot +sudo ln -s /90apt-zfs-snapshot.conf \ + /etc/apt/apt.conf.d/90apt-zfs-snapshot.conf +sudo install -Dm644 /apt-zfs-snapshot.conf \ + /etc/apt-zfs-snapshot.conf ``` +The symlink targets must remain at the paths used in the commands above. If +you choose different target locations, update the executable path in +`90apt-zfs-snapshot.conf` as well. + Set `dry_run='true'` in `/etc/apt-zfs-snapshot.conf`, run a harmless APT operation, and inspect the planned names. Set it back to `false` after verifying dataset selection and naming. The helper runs as root through APT and requires Bash, `zfs`, and `findmnt`.