diff --git a/templates/etc/ferm/ferm.d/fail2ban.conf.j2 b/templates/etc/ferm/ferm.d/fail2ban.conf.j2 index 8320908..1e93a48 100644 --- a/templates/etc/ferm/ferm.d/fail2ban.conf.j2 +++ b/templates/etc/ferm/ferm.d/fail2ban.conf.j2 @@ -5,8 +5,8 @@ {% endif %} {% if item.when is undefined or item.when | bool %} -@hook post "type fail2ban-server > /dev/null && (fail2ban-client ping > /dev/null && fail2ban-client reload > /dev/null || true) || true"; -@hook flush "type fail2ban-server > /dev/null && (fail2ban-client ping > /dev/null && fail2ban-client reload > /dev/null || true) || true"; +@hook post "/bin/systemctl condrestart fail2ban.service"; +@hook flush "/bin/systemctl condrestart fail2ban.service"; {% else %} # Rule disabled by 'item.when' condition {% endif %}