From 747230ee2d74402aece6a1712ec982c05d3cb917 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Thu, 1 May 2025 22:09:49 -0600 Subject: [PATCH] list: Fix getting hostname on stopped jails --- usr/local/share/bastille/list.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/local/share/bastille/list.sh b/usr/local/share/bastille/list.sh index d51a132d..0236c7fc 100644 --- a/usr/local/share/bastille/list.sh +++ b/usr/local/share/bastille/list.sh @@ -211,6 +211,9 @@ get_jail_info() { # Set jail path JAIL_PATH="${bastille_jailsdir}/${JAIL_NAME}" + # Get jail hostname + JAIL_HOSTNAME="$(bastille config ${JAIL_NAME} get host.hostname)" + # Get jail ports (inactive) if [ -f "${bastille_jailsdir}/${JAIL_NAME}/rdr.conf" ]; then JAIL_PORTS=$(awk '$1 ~ /^[tcp|udp]/ { printf "%s/%s:%s,",$1,$2,$3 }' "${bastille_jailsdir}/${JAIL_NAME}/rdr.conf" 2> /dev/null | sed "s/,$//"); else JAIL_PORTS=""; fi