diff options
author | Cameron Norman <CameronNemo@users.noreply.github.com> | 2014-04-19 14:12:20 -0700 |
---|---|---|
committer | Cameron Norman <CameronNemo@users.noreply.github.com> | 2014-04-19 14:12:20 -0700 |
commit | 0ef5027234fa6eaa9716abc9dd5ddcc5e67a3fe5 (patch) | |
tree | c1255195ff9e5fa7c0f29d5c962667754d51caf2 /files/fail2ban.upstart | |
parent | 0c8e72f45266ef1ce44cbd8acda304fb3e1bc689 (diff) | |
download | fail2ban-0ef5027234fa6eaa9716abc9dd5ddcc5e67a3fe5.tar.gz |
Change Upstart job to track PID of the server
This only works correctly if the client does not fork itself when starting the server (which forks twice further).
Diffstat (limited to 'files/fail2ban.upstart')
-rw-r--r-- | files/fail2ban.upstart | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/files/fail2ban.upstart b/files/fail2ban.upstart index ccf267f0..8a7ba10c 100644 --- a/files/fail2ban.upstart +++ b/files/fail2ban.upstart @@ -3,5 +3,13 @@ description "fail2ban - ban hosts that cause multiple authentication errors" start on filesystem and started networking stop on deconfiguring-networking -pre-start exec /usr/bin/fail2ban-client -x start +expect daemon +respawn + +pre-start script + [ -d /var/run/fail2ban ] || mkdir -p /var/run/fail2ban +end script + +exec /usr/bin/fail2ban-client -x start + post-stop exec /usr/bin/fail2ban-client stop |