remove "which pfctl"

We assume that if the jail has an ip4.addr value, then pfctl is obviously installed.

It is also not invoked by start, so stop should not need it either.
This commit is contained in:
tschettervictor
2024-12-10 15:04:27 -07:00
committed by GitHub
parent 42a5a38334
commit 2a8a070251

View File

@@ -55,7 +55,7 @@ for _jail in ${JAILS}; do
_ip4="$( bastille config ${_jail} get ip4.addr )"
# Check if pfctl is present
if [ which -s pfctl ] && [ "${_ip4}" != "not set" ]; then
if [ "${_ip4}" != "not set" ]; then
if [ "$(bastille rdr ${_jail} list)" ]; then
bastille rdr ${_jail} clear
fi