mirror of https://github.com/fail2ban/fail2ban
systemd service update:
- starting service in normal mode (without forking) - does not restart if service exited normally (exit-code 0, e.g. stopped via fail2ban-client) - does not restart if service can not start (exit-code 255, e.g. wrong configuration, etc.) - service can be additionally started/stopped with commands (fail2ban-client, fail2ban-server)pull/1618/head
parent
261f875748
commit
528a7a5abb
|
@ -5,12 +5,13 @@ After=network.target iptables.service firewalld.service
|
||||||
PartOf=iptables.service firewalld.service
|
PartOf=iptables.service firewalld.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=simple
|
||||||
ExecStart=/usr/bin/fail2ban-client -x start
|
ExecStart=/usr/bin/fail2ban-server -xf start
|
||||||
ExecStop=/usr/bin/fail2ban-client stop
|
ExecStop=/usr/bin/fail2ban-client stop
|
||||||
ExecReload=/usr/bin/fail2ban-client reload
|
ExecReload=/usr/bin/fail2ban-client reload
|
||||||
PIDFile=/var/run/fail2ban/fail2ban.pid
|
PIDFile=/var/run/fail2ban/fail2ban.pid
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
|
RestartPreventExitStatus=0 255
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Reference in New Issue