From 2da817e0d435475741d45b97e62c720d49058a6d Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Tue, 7 Jan 2025 23:16:35 -0700 Subject: [PATCH] list: use list command for jail list --- usr/local/share/bastille/list.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr/local/share/bastille/list.sh b/usr/local/share/bastille/list.sh index 0a6b6b3c..085ba0cb 100644 --- a/usr/local/share/bastille/list.sh +++ b/usr/local/share/bastille/list.sh @@ -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