Create required jail/root dataset on ZFS setups

This commit is contained in:
Jose
2019-11-03 01:58:29 -04:00
parent 3c5d961925
commit 4f67515157
2 changed files with 5 additions and 1 deletions

View File

@@ -55,6 +55,8 @@ destroy_jail() {
echo -e "${COLOR_GREEN}Deleting Jail: ${NAME}.${COLOR_RESET}"
if [ "${bastille_zfs_enable}" = "YES" ]; then
if [ ! -z "${bastille_zfs_zpool}" ]; then
## remove zfs datasets individually
zfs destroy ${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${NAME}/root
zfs destroy ${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${NAME}
fi
fi