mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-05-13 22:46:48 +00:00
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)
This commit is contained in:
parent
261f875748
commit
528a7a5abb
1 changed files with 4 additions and 3 deletions
|
|
@ -5,12 +5,13 @@ After=network.target iptables.service firewalld.service
|
|||
PartOf=iptables.service firewalld.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/fail2ban-client -x start
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/fail2ban-server -xf start
|
||||
ExecStop=/usr/bin/fail2ban-client stop
|
||||
ExecReload=/usr/bin/fail2ban-client reload
|
||||
PIDFile=/var/run/fail2ban/fail2ban.pid
|
||||
Restart=always
|
||||
Restart=on-failure
|
||||
RestartPreventExitStatus=0 255
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue