containers/conts-snap.sh

16 lines
295 B
Bash
Raw Normal View History

2022-07-24 20:28:08 +02:00
#!/usr/bin/env bash
source "$(dirname "$0")/variables.conf"
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 "-15 days" +"%Y%m%d")*
done
umount $containers_dir
exit 0