FS#31247 - [fail2ban] ships incorrect systemd service file

Attached to Project: Arch Linux
Opened by patrick (brisbin33) - Wednesday, 22 August 2012, 15:31 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 22 August 2012, 15:47 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Fail2ban expects to have /var/run/fail2ban available and stores its PID file there. This may be configurable, but it's what's expected by the current rc.d script, so I assume it's the default that we should ship for.

The current service file (v0.8.7.1-3) is incorrect in that it does not create the working directory and specifies a different PID file. The service fails to start.

The following works for me:


[Unit]
Description=Ban IPs that make too many password failures
After=syslog.target network.target

[Service]
Type=forking
PIDFile=/run/fail2ban/fail2ban.pid
ExecStartPre=/bin/mkdir -p /var/run/fail2ban
ExecStart=/usr/bin/fail2ban-client start
ExecReload=/usr/bin/fail2ban-client reload
ExecStop=/usr/bin/fail2ban-client stop

[Install]
WantedBy=multi-user.target


Thanks,
Pat
This task depends upon

Closed by  Dave Reisner (falconindy)
Wednesday, 22 August 2012, 15:47 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#31170