containers/conts-snap.sh

17 lines
338 B
Bash
Raw Normal View History

2022-07-24 20:28:08 +02:00
#!/usr/bin/env bash
2022-09-22 18:50:02 +02:00
run_directory=$(dirname $(readlink -f "$0"))
source "$run_directory/variables.conf"
2022-07-24 20:28:08 +02:00
mount $containers_dir
cd /var/lib/machines
for filename in *; do
systemctl start cont-snap@$filename.service
btrfs subvolume delete $containers_dir/$filename/$(date -d "-8 days" +"%Y%m%d")*
2022-07-24 20:28:08 +02:00
done
umount $containers_dir
exit 0