mirror of https://github.com/fail2ban/fail2ban
Use RuntimeDirectory to create /run/fail2ban
Instead of the duplicated tmpfiles + ExecStartPre. This way the lifetime of that directory becomes fixed, and also User is automatically respected for the ownership of the directory (making it easy to run fail2ban as a non-root user, like it was with at least the Debian init script).pull/2537/head
parent
3359845242
commit
60b136333e
|
@ -1 +0,0 @@
|
|||
D /run/fail2ban 0755 root root -
|
|
@ -7,7 +7,7 @@ PartOf=iptables.service firewalld.service ip6tables.service ipset.service nftabl
|
|||
[Service]
|
||||
Type=simple
|
||||
Environment="PYTHONNOUSERSITE=1"
|
||||
ExecStartPre=/bin/mkdir -p /run/fail2ban
|
||||
RuntimeDirectory=fail2ban
|
||||
ExecStart=@BINDIR@/fail2ban-server -xf start
|
||||
# if should be logged in systemd journal, use following line or set logtarget to sysout in fail2ban.local
|
||||
# ExecStart=@BINDIR@/fail2ban-server -xf --logtarget=sysout start
|
||||
|
|
Loading…
Reference in New Issue