mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-04 03:33:41 +01:00
log rctl events to /var/log/messages
This commit is contained in:
@@ -62,13 +62,15 @@ for _jail in ${JAILS}; do
|
||||
info "[${_jail}]:"
|
||||
|
||||
_rctl_rule="jail:${_jail}:${OPTION}:deny=${VALUE}/jail"
|
||||
_rctl_rule_log="jail:${_jail}:${OPTION}:log=${VALUE}/jail"
|
||||
|
||||
## if entry doesn't exist, add; else show existing entry
|
||||
if ! grep -qs "${_rctl_rule}" "${bastille_jailsdir}/${_jail}/rctl.conf"; then
|
||||
echo "${_rctl_rule}" >> "${bastille_jailsdir}/${_jail}/rctl.conf"
|
||||
echo "${_rctl_rule_log}" >> "${bastille_jailsdir}/${_jail}/rctl.conf"
|
||||
fi
|
||||
|
||||
echo -e "${OPTION} ${VALUE}"
|
||||
rctl -a "${_rctl_rule}"
|
||||
rctl -a "${_rctl_rule}" "${_rctl_rule_log}"
|
||||
echo -e "${COLOR_RESET}"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user