From 77117022566dc95c85f3e42576ec75d8ce5b6184 Mon Sep 17 00:00:00 2001 From: matthiasberner Date: Fri, 29 Nov 2024 22:22:29 +0100 Subject: [PATCH] usr/local/share/bastille/common.sh aktualisiert --- usr/local/share/bastille/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/share/bastille/common.sh b/usr/local/share/bastille/common.sh index a78fd1d..83af981 100644 --- a/usr/local/share/bastille/common.sh +++ b/usr/local/share/bastille/common.sh @@ -80,7 +80,7 @@ generate_vnet_jail_netblock() { local jail_list=$(bastille list jails) if [ -n "${jail_list}" ]; then # local list_jails_num=$(echo "${jail_list}" | wc -l | awk '{print $1}') - local list_jails_num=$(grep -e "e[0-9]b_bastille" "${bastille_jailsdir}"/*/jail.conf | grep -Eo '(bastille)([0-9]{1,3});' | grep -Eo '[0-9]{1,2}' | wc -l | awk '{print $1}') + local list_jails_num=$(grep -e "e[0-9]b_bastille" "${bastille_jailsdir}"/*/jail.conf | grep -Eo '(bastille)([0-9]{1,3});' | grep -Eo '[0-9]{1,2}' | sort -hr | head -1 | awk '{print $1}') local num_range=$((list_jails_num + 1)) for _num in $(seq 0 "${num_range}"); do if ! grep -q "e[0-9]b_bastille${_num}" "${bastille_jailsdir}"/*/jail.conf; then -- 2.52.0