Skip to content

Commit

Permalink
list: use list command for jail list
Browse files Browse the repository at this point in the history
  • Loading branch information
tschettervictor authored Jan 8, 2025
1 parent e5f5655 commit 2da817e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions usr/local/share/bastille/list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ list_import(){

list_ports(){
if [ -d "${bastille_jailsdir}" ]; then
JAIL_LIST=$(ls "${bastille_jailsdir}" | sed "s/\n//g")
for _JAIL in ${JAIL_LIST}; do
if [ -f "${bastille_jailsdir}/${_JAIL}/rdr.conf" ]; then
_PORTS="$(cat "${bastille_jailsdir}"/"${_JAIL}"/rdr.conf)"
info "[${_JAIL}]:"
JAIL_LIST="$(bastille list jails)"
for _jail in ${JAIL_LIST}; do
if [ -f "${bastille_jailsdir}/${_jail}/rdr.conf" ]; then
_PORTS="$(cat ${bastille_jailsdir}/${_jail}/rdr.conf)"
info "[${_jail}]:"
echo "${_PORTS}"
fi
done
Expand Down

0 comments on commit 2da817e

Please sign in to comment.