This commit is contained in:
2026-02-28 15:39:36 +00:00
parent 3e3a1481a7
commit dfa89dced4

View File

@@ -22,7 +22,7 @@
mount /dev/disk/by-partlabel/disk-stationette-root /btrfs_tmp mount /dev/disk/by-partlabel/disk-stationette-root /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots mkdir -p /btrfs_tmp/old_roots
timestamp=$(dat +%Y-%m-%d_%H-%M-%S) timestamp=$(date +%Y-%m-%d_%H-%M-%S)
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp" mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi fi
@@ -34,7 +34,7 @@
btrfs subvolume delete "$1" btrfs subvolume delete "$1"
} }
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +7); do
delete_subvolume_recursively "$i" delete_subvolume_recursively "$i"
done done