limits: Redirect errors

This commit is contained in:
tschettervictor
2025-03-21 17:51:34 -06:00
committed by GitHub
parent b200f1bf5a
commit 70c79c8d62

View File

@@ -109,16 +109,18 @@ for _jail in ${JAILS}; do
# Remove limits # Remove limits
if [ -s "${bastille_jailsdir}/${_jail}/rctl.conf" ]; then if [ -s "${bastille_jailsdir}/${_jail}/rctl.conf" ]; then
while read _limits; do while read _limits; do
rctl -r "${_limits}" rctl -r "${_limits}" 2 > /dev/null
done < "${bastille_jailsdir}/${_jail}/rctl.conf" done < "${bastille_jailsdir}/${_jail}/rctl.conf"
info "[${TARGET}]: RCTL limits cleared."
fi fi
;; ;;
reset) reset)
# Remove limits and delete rctl.conf # Remove limits and delete rctl.conf
if [ -s "${bastille_jailsdir}/${_jail}/rctl.conf" ]; then if [ -s "${bastille_jailsdir}/${_jail}/rctl.conf" ]; then
while read _limits; do while read _limits; do
rctl -r "${_limits}" rctl -r "${_limits}" 2 > /dev/null
done < "${bastille_jailsdir}/${_jail}/rctl.conf" done < "${bastille_jailsdir}/${_jail}/rctl.conf"
info "[${TARGET}]: RCTL limits cleared."
fi fi
if [ -s "${bastille_jailsdir}/${_jail}/rctl.conf" ]; then if [ -s "${bastille_jailsdir}/${_jail}/rctl.conf" ]; then
rm -f "${bastille_jailsdir}/${_jail}/rctl.conf" rm -f "${bastille_jailsdir}/${_jail}/rctl.conf"