mirror of
https://github.com/hackacad/bastille.git
synced 2026-05-19 21:55:25 +02:00
Just grep globally if jail list not empty
This commit is contained in:
@@ -148,12 +148,12 @@ generate_vnet_jail_conf() {
|
||||
local num_range=$(expr "${list_jails_num}" + 1)
|
||||
jail_list=$(bastille list jail)
|
||||
for _num in $(seq 0 "${num_range}"); do
|
||||
for _jail in ${jail_list}; do
|
||||
if ! grep -q "e0b_bastille${_num}" "${bastille_jailsdir}"/${_jail}/jail.conf; then
|
||||
if [ -n "${jail_list}" ]; then
|
||||
if ! grep -q "e0b_bastille${_num}" "${bastille_jailsdir}"/*/jail.conf; then
|
||||
uniq_epair="bastille${_num}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
## generate config
|
||||
|
||||
Reference in New Issue
Block a user