fail2ban/files
Michael Orlitzky 654fda8a50 files/fail2ban-openrc*: let start-stop-daemon manage the server.
There are two ways that it would make sense to write the OpenRC
service script for fail2ban:

  1. Use the fail2ban-client program to stop, start, reload, etc. the
     server; and try to figure out whether or not it worked afterwards.

  2. Use the start-stop-daemon program built into OpenRC to manage the
     fail2ban-server process. This works only for starting and stopping,
     because the "reload" command is sent over an undocumented protocol,
     but has the benefit that you get immediate feedback about the result
     of calling fail2ban-server.

The existing service script combined the two in a way that appeared to
work, but didn't make too much sense. It used start-stop-daemon to
initiate the fail2ban-client program with either a "start" or "stop"
argument. So long as everything goes fine, that appears to work. But
the start-stop-daemon is not actually monitoring the fail2ban-client
program; it's supposed to be monitoring the fail2ban-server process
that gets started as side-effect.

The existing stop() function does not do quite what you'd expect; for
example the "stop" command is never sent. Again, the daemon does
ultimately get stopped so long as the hard-coded PID file contains
what you think it does -- so it "works" -- but is misleading.

This commit changes everything to use the second approach above, where
start-stop-daemon manages everything. This was done mainly to simplify
the service script, because now the default start() and stop() phases
can be used, allowing us to delete them from our copy. One might worry
that there is some special magic behind "fail2ban-client start" and
"fail2ban-client stop", however that does not appear to be the
case. Admittedly, if in the future those two commands begin to do
something nonstandard, the service script would need to be changed
again to take the first approach above and use fail2ban-client for
everything.
2021-05-14 07:38:00 -04:00
..
cacti
logwatch
monit By the author: 2016-09-22 20:29:26 +00:00
nagios files: Strip trailing whitespace from files 2015-10-08 16:18:08 +02:00
bash-completion added new logtarget "SYSOUT" to log from fail2ban working in foreground as systemd-service (in opposite to "STDOUT" don't log time-stamps). 2017-11-26 23:03:29 +01:00
debian-initd Solution for issue #1665 2017-01-13 08:59:45 +01:00
fail2ban-logrotate Remove compression and count from logrotate 2016-01-29 00:15:48 +01:00
fail2ban-openrc.conf files/fail2ban-openrc*: let start-stop-daemon manage the server. 2021-05-14 07:38:00 -04:00
fail2ban-openrc.init files/fail2ban-openrc*: let start-stop-daemon manage the server. 2021-05-14 07:38:00 -04:00
fail2ban-tmpfiles.conf
fail2ban.service.in added new logtarget "SYSOUT" to log from fail2ban working in foreground as systemd-service (in opposite to "STDOUT" don't log time-stamps). 2017-11-26 23:03:29 +01:00
fail2ban.upstart
gen_badbots files: Strip trailing whitespace from files 2015-10-08 16:18:08 +02:00
ipmasq-ZZZzzz_fail2ban.rul
macosx-initd
redhat-initd
solaris-fail2ban.xml
solaris-svc-fail2ban files: Strip trailing whitespace from files 2015-10-08 16:18:08 +02:00
suse-initd files: Strip trailing whitespace from files 2015-10-08 16:18:08 +02:00