mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-04 03:33:41 +01:00
User option to force destroy jail in ZFS
This commit is contained in:
@@ -60,8 +60,12 @@ destroy_jail() {
|
|||||||
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
||||||
if [ -n "${bastille_zfs_zpool}" ]; then
|
if [ -n "${bastille_zfs_zpool}" ]; then
|
||||||
if [ -n "${TARGET}" ]; then
|
if [ -n "${TARGET}" ]; then
|
||||||
|
local OPTIONS="-r"
|
||||||
|
if [ "${FORCE}" = "1" ]; then
|
||||||
|
local OPTIONS="-rf"
|
||||||
|
fi
|
||||||
## remove jail zfs dataset recursively
|
## remove jail zfs dataset recursively
|
||||||
zfs destroy -r "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}"
|
zfs destroy "${OPTIONS}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user