#!/bin/bash if [ -f /run/appdata_active_snapshot.txt ]; then SNAPSHOT_NAME=$(cat /run/appdata_active_snapshot.txt) # Unmount and clean up scratch directory umount -R /mnt/appdata-scratch || true rmdir /mnt/appdata-scratch || true # Destroy the recursive snapshot tree across all appdata datasets zfs destroy -r tank/appdata@"$SNAPSHOT_NAME" rm -f /run/appdata_active_snapshot.txt fi