Only restart fail2ban in rc.firewall if it's *not* started from boot.

This commit is contained in:
Darren 'Tadgy' Austin 2022-09-03 17:48:46 +01:00
commit bd76367f27
3 changed files with 13 additions and 7 deletions

View file

@ -187,7 +187,9 @@ case "$1" in
;;
esac
# Restart fail2ban to re-create the ban chains.
[[ -x /etc/rc.d/rc.fail2ban ]] && /etc/rc.d/rc.fail2ban restart >/dev/null
# Unless the system is booting, restart fail2ban to re-create the ban chains.
[[ "$PREVLEVEL" != "N" ]] && {
[[ -x /etc/rc.d/rc.fail2ban ]] && /etc/rc.d/rc.fail2ban restart >/dev/null
}
exit 0