Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run swabber as a forking systemd service #17

Merged
merged 8 commits into from
Dec 8, 2017
Merged

Conversation

DonnchaC
Copy link
Contributor

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.

DonnchaC and others added 7 commits October 23, 2017 15:22
We are using a forking type systemd service which expects the parent
process to fork once and then exit. The Python script was doing two
forks which prevented systemd from identifying the forked process.

Removing the second fork allows systemd to detect and correctly manage
the forked process.
@RamJett RamJett merged commit d75099d into master Dec 8, 2017
@DonnchaC DonnchaC deleted the feature/systemd-forking branch December 12, 2017 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants