diff --git a/caddy-jail.sh b/caddy-jail.sh index 008c168..969e454 100644 --- a/caddy-jail.sh +++ b/caddy-jail.sh @@ -103,11 +103,11 @@ cat <<__EOF__ >/tmp/pkg.json __EOF__ # Create the jail and install previously listed packages -#if ! iocage create --name "${JAIL_NAME}" -p /tmp/pkg.json -r "${RELEASE}" interfaces="${JAIL_INTERFACES}" ip4_addr="${INTERFACE}|${IP}/${NETMASK}" defaultrouter="${DEFAULT_GW_IP}" boot="on" host_hostname="${JAIL_NAME}" vnet="${VNET}" -#then -# echo "Failed to create jail" -# exit 1 -#fi +if ! iocage create --name "${JAIL_NAME}" -p /tmp/pkg.json -r "${RELEASE}" interfaces="${JAIL_INTERFACES}" ip4_addr="${INTERFACE}|${IP}/${NETMASK}" defaultrouter="${DEFAULT_GW_IP}" boot="on" host_hostname="${JAIL_NAME}" vnet="${VNET}" +then + echo "Failed to create jail" + exit 1 +fi rm /tmp/pkg.json #####