Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4984e64e91 | |||
| 7711702256 |
@@ -80,7 +80,7 @@ generate_vnet_jail_netblock() {
|
|||||||
local jail_list=$(bastille list jails)
|
local jail_list=$(bastille list jails)
|
||||||
if [ -n "${jail_list}" ]; then
|
if [ -n "${jail_list}" ]; then
|
||||||
# local list_jails_num=$(echo "${jail_list}" | wc -l | awk '{print $1}')
|
# 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))
|
local num_range=$((list_jails_num + 1))
|
||||||
for _num in $(seq 0 "${num_range}"); do
|
for _num in $(seq 0 "${num_range}"); do
|
||||||
if ! grep -q "e[0-9]b_bastille${_num}" "${bastille_jailsdir}"/*/jail.conf; then
|
if ! grep -q "e[0-9]b_bastille${_num}" "${bastille_jailsdir}"/*/jail.conf; then
|
||||||
|
|||||||
Reference in New Issue
Block a user