Skip to content

Commit

Permalink
Update template.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tschettervictor authored Feb 23, 2025
1 parent f0063b4 commit f06788e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions usr/local/share/bastille/template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ for _jail in ${JAILS}; do
error_notify "Jail IP not found: ${_jail}"
_jail_ip4='' # In case it was -. -- cwells
_jail_ip6='' # In case it was -. -- cwells
else
if echo "${_jail_ip4}" | grep -q "|"; then
_jail_ip4="$(echo ${_jail_ip4} 2>/dev/null | awk -F"|" '{print $2}' | sed -E 's#/[0-9]+$##g')"
fi
if echo "${_jail_ip6}" | grep -q "|"; then
_jail_ip6="$(echo ${_jail_ip6} 2>/dev/null | awk -F"|" '{print $2}' | sed -E 's#/[0-9]+$##g')"
fi
fi
else
if echo "${_jail_ip4}" | grep -q "|"; then
_jail_ip4="$(echo ${_jail_ip4} 2>/dev/null | awk -F"|" '{print $2}' | sed -E 's#/[0-9]+$##g')"
fi
if echo "${_jail_ip6}" | grep -q "|"; then
_jail_ip6="$(echo ${_jail_ip6} 2>/dev/null | awk -F"|" '{print $2}' | sed -E 's#/[0-9]+$##g')"
fi
fi

Expand Down

0 comments on commit f06788e

Please sign in to comment.