From 295612da5fc03d36fecf6129ee17f589457deba3 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Fri, 28 Feb 2025 11:49:29 -0700 Subject: [PATCH] create: Do not check running if empty jail --- usr/local/share/bastille/create.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index 03d35e41..806df544 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -554,10 +554,12 @@ create_jail() { fi fi - # Exit if jail was not started, which means something is wrong. - if ! check_target_is_running "${NAME}"; then - bastille destroy "${NAME}" - error_exit "[${NAME}]: Failed to create jail..." + # Exit if jail was not started, except for empty jails + if [ -z "${EMPTY_JAIL}" ]; then + if ! check_target_is_running "${NAME}"; then + bastille destroy "${NAME}" + error_exit "[${NAME}]: Failed to create jail..." + fi fi if [ -n "${VNET_JAIL}" ]; then