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

[Service]
Type=forking
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
ExecStopPost=/bin/rmdir /var/run/fail2ban
PIDFile=/var/run/fail2ban/fail2ban.pid

[Install]
WantedBy=multi-user.target