From 87e9affe46540cc9aacc185585a409817590fb18 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sun, 23 Feb 2025 09:24:15 -0700 Subject: [PATCH] template: Print only the first IP for the jail --- usr/local/share/bastille/template.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index 7802f836..030b79c0 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -232,8 +232,8 @@ for _jail in ${JAILS}; do ## get jail ip4 and ip6 values bastille_jail_path=$(/usr/sbin/jls -j "${_jail}" path) if [ "$(bastille config ${_jail} get vnet)" != 'enabled' ]; then - _jail_ip4="$(bastille config ${_jail} get ip4.addr | sed 's/,/ /g')" - _jail_ip6="$(bastille config ${_jail} get ip6.addr | sed 's/,/ /g')" + _jail_ip4="$(bastille config ${_jail} get ip4.addr | sed 's/,/ /g' | awk '{print $1}')" + _jail_ip6="$(bastille config ${_jail} get ip6.addr | sed 's/,/ /g' | awk '{print $1}')" fi ## remove value if ip4 was not set or disabled, otherwise get value if [ "${_jail_ip4}" = "not set" ] || [ "${_jail_ip4}" = "disabled" ]; then