#!/bin/bash
#
# Delete snapshots
# Copyright Daniel Mehrmann (Akusari) 2024
#

#
# settings
#

source /usr/local/etc/make_backup.conf
volume_array=($lvm_volumes)
ret=0

### delete snapshots ###

for volume in "${volume_array[@]}"; do
   /usr/sbin/lvremove -y "${lvm_group}"/snap-"${volume}" || ret=255
done

exit $ret
