equalitie / swabber

Simple pubsub-based IP banning engine
7 stars 4 forks source link

Run swabber as a forking systemd service #17

Closed DonnchaC closed 6 years ago

DonnchaC commented 6 years ago

This PR is revision of #16 which retains the Python forking/daemon code. It should be compatible with the sysV init script.

I have tested the SystemD service on Debian 9. Starting, stopping and reloading the service should all work correctly. I fixed a bug where an exception would be raised when the service was reload twice. The error was caused by the banfetcher thread not being restarted after the first reload.

The default interface in the example config file is now +. This interface name is passed to the iptables command line. + is an iptables interface wildcard which will match all interfaces.

This PR adds an example service unit file to the repo and includes installation instructions in the README.